Hi Inna,
This is an interesting way of displaying points. I spoke with one of our lead architects who has some thoughts on how you might best render these points:
"After looking at your sample I think there are two ways to get better speed.
The first, and one I don’t recommend but is easier, is to break up your data into different InMemoryFeatureLayers and specify them to draw at different scales. In this way each layer will only hold data that it will display at that scale so the system does not have to look though all of the data we won’t draw just to find some data we will draw.
We attempted to do this in your sample however with your custom zoom levels and other factors we decided it would take longer than the time we had allocated for a discussion forum post.
The second way, which I think is better and faster, would be to create your own layer either inherited from Layer or from FeatureLayer and approach things a bit differently. It seems like you have a matrix where each cell has a world extent and at various scales different cells will draw. For example at scale 1 you might draw every fourth cell because it is at the 1 degree mark. At another scale it might be every other one etc. My suggest is that, since you know the algorithm, you put at the core of your new layer your matrix and when the DrawCore gets called you look at the extent it passes in and the scale you are at and you use a bit of math to determine which cells you pull out of your matric to draw.
For example you know the boundary of your matrix and you know the cell size in world extent so you can isolate just the cells you know are visible and then you can augment that with knowing which of those cells are appropriate at that scale. I think if you did this it would be very fast because the index is bit of math and you can just use the matrix you have and do not need to generate anything else besides a two dimensional array, which you may already have. We do things like this to find the tiles to draw for a particular extent when the tile matrix is huge and we adjust what we find by the scale.
The problem is to do an example based on your sample falls outside the realm of a forums post. If I did a good job explaining it I think you have a good shot at writing it. I can answer your questions but if you need us to write a sample integrated into your code we will have to do that as a small professional services job."