[OpenLayers-Dev] OpenLayers performance
Christopher Schmidt
crschmidt at metacarta.com
Mon Apr 7 13:16:31 EDT 2008
On Mon, Apr 07, 2008 at 05:34:41PM +0200, Tomas Novotny wrote:
> I'm after few months of using OpenLayers (OL). I've built some
> application on OL and appreciated it's architecture for good extensibility.
> But when things come to performance of such common task as panning
> (moving a map with mouse), I am really dissatisfied.
Patches welcome.
> The way the panning is implemented is everything but not
> browser-friendly. There is coord2pixel and pixel2coord processing on
> several places in those moveTo() and setCenter() methods on every mouse
> move and it is only part of the problem. A tried to prune OL for tests
> to just moving map div with one empty layer and things were still the
> same. You can feel lags as you are moving map from side to side, up and
> down. When you try to compare it with ie. GoogleMaps you can really feel
> the difference.
I'll state for the record that I don't feel any difference -- if
anything, I typically feel like GMaps is slower than OpenLayers.
However, there are a number of patches in trac which have been stated by
their authors to be 'faster' or 'improve performance', which are
currently marked for further investigation in OpenLayers 2.7.
> I haven't seen any OL example with better feeling so I think it's a
> matter of source architecture, not bug.
The architecture of OpenLayers is not designed to be slow. If you are
finding that it is slow, there is no reason that a refactoring of that
aspect of the code would not be appreciated so long as it did not
regress in behavior in some important way.
> What I'm trying to say? I found out that OL are good for building robust
> applications where wide functionality is the goal, not the performance.
> If I'm not right and making something wrong please tell me.
I don't think that OpenLayers tries to be slow in any way. If you feel
there are obvious deficiencies in the way that OpenLayers does things,
and see a better way, please feel free to offer them up as comments to
the community.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Dev
mailing list