6 ConclusionTop5.3 Tests5.4 Problems

Contents

German

5.4 Problems

5.4.1 Performance

The biggest problem with the implementation of the animated zooming feature was and is the issue of performance, because as more tiles are scaled, the scaling process slows down accordingly. Because of this issue, the simultaneous scaling of all active overlays was not considered in the early development stages (see Section 5.2.2). Even with a base layer the zoom process can be noticeably slower when the view area is large as opposed to a smaller map view of, say, 512 x 512 pixels.

In the search for a solution the following approach for performance optimization was developed: during scaling a change in the position and size of tiles is carried out on the basis of central CSS classes which are assigned to the tiles line-by-line (column-by-column), rather than using a CSS-style parameter for each graphic. Accordingly, one CSS class per tile column or line would determine the left or top position of the tile. The tile width and height would be the same for all classes. For scaling a tile grid of 4 x 4, a modification to 8 CSS classes would be required, as compared to 16 CSS style characteristics in each tile.
This concept had been implemented on a test basis, but was later abandoned when the hoped-for improvement in speed did not occur. Detailed measurements were not carried out.

A second optimization solution was more successful and became a part of the developed extension: only the tiles that are completely or partially located in the visible area are scaled. All other tiles (ie. outside the visible area) are not included in the scale process (see setTilesOutsideInvisible; Grid.js). For example: Given a map window of 512 x 512 px and a tile size of 256 px, Grid.js by default creates a 7 x 6 tile grid. Accordingly, a maximum of nine tiles can be found in the visible area at the same time. The number of tiles which have to be scaled can therefore be reduced from 42 to a maximum of nine.

An additional performance problem was discovered during the implementation of the test plan. Internet Explorer slows down noticeably with tiles of over 32768 pixels, which in some cases resulted in a crash of the browser. A solution to this problem is described in Section 5.3.2.

5.4.2 Layer Types

The desired implementation of the animated zooming features for all layers supported by OpenLayers (as outlined in the should-have list) could not be fully realized (see Section 5.2.6). The difficulty (and associated effort) with implementing the layer-specific special characteristics were underestimated during the conceptualization phase. As a result, the effort was limited to the layer types Image, WMS Untiled and Grid (inc. sub layers).

5.4.3 Component Tests

Difficulties were encountered during the creation of the unit test components in which asynchronous code was supposed to be tested. The two characteristic of delay_call() as described in Section 5.3.1 are not documented in [Test.AnotherWay]. Extensive research and an inquiry over the OpenLayers developer's mailing list did not yield an answer. The solution was discovered only towards the end of the implemention. Therefore the component tests were not developed in immediately parallel with the implemention, as was planned.


© June 1, 2007 | Emanuel Schütze | some rights reserved.
This work is licensed under the Creative Commons License Attribution-ShareAlike 2.0 Germany.


6 ConclusionTop5.3 Tests5.4 ProblemsContentsGerman