And I tried to add 4 millions points layer to TileMill, it will crash
TileMill is designed for this, and will not crash if your data is properly indexed and formatted. The reason why this isn't working usually boils down to "your data isn't indexed". If you want to use a shapefile, use shapeindex to index it: otherwise import your data into PostGIS and make sure the table as a correct index.