Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#1023 closed defect (fixed)

Low perfomace while generating legend

Reported by: liuar Owned by: Arthur Liu
Priority: medium Milestone: 2.1
Component: General Version: 2.0.2
Severity: major Keywords:
Cc: External ID: 1236462

Description

A customer who has a map with 700+ layers. Currently each layer sends request to generate legend even if it’s hidden or disabled. The legend should be generated on demand to improve performance.

Expect: The legend generated dynamically, so the map author could improve the performace by well organized groups.

  1. For the layers which are not displayed in the legend, browser should not send requests to generate legend images.
  2. If the user expand a group, then the request will be sent out to generate the legend images for the layers in that group.
  3. If a layer's legend image is requested, browser will not send requests unless the legend image has been changed due to the scale changing.

Attachments (2)

Dynamic Legend.patch (7.1 KB) - added by liuar 9 years ago.
extra white box in legend.GIF (13.2 KB) - added by tomfukushima 9 years ago.
Shows a problem with the patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by zspitzer

simply having some basic caching for legend images would really help here

comment:2 in reply to:  1 Changed 9 years ago by liuar

Replying to zspitzer:

simply having some basic caching for legend images would really help here

Thanks for your reply. Caching is a good way to resolve such kind fo problems. But for this case, we cannot use cache. For example, if we cached a legend image of a layer, the image will not change during the layer's scale changing. I would like to add a flag in layer item: iconWasRequested to mark if the legend image has been requested. The flag will be set to false while the layer's scale changed.

Changed 9 years ago by liuar

Attachment: Dynamic Legend.patch added

Changed 9 years ago by tomfukushima

Shows a problem with the patch

comment:3 Changed 9 years ago by tomfukushima

I tried out the patch but found the error that is shown in the attached (extra white box in legend.gif) image. Are you able to reproduce? What I did was open the Sheboygan sample and zoomed in until the themed parcel layer showed up.

comment:4 in reply to:  3 Changed 9 years ago by liuar

Replying to tomfukushima:

I tried out the patch but found the error that is shown in the attached (extra white box in legend.gif) image. Are you able to reproduce? What I did was open the Sheboygan sample and zoomed in until the themed parcel layer showed up.

I can reproduce that. Howerver, it's reproducible in previous revision either.

comment:5 Changed 9 years ago by tomfukushima

Right that is some new behavior with the fix to #800. Submitting this patch: r4056.

comment:6 Changed 9 years ago by tomfukushima

Resolution: fixed
Status: newclosed

comment:7 Changed 9 years ago by tomfukushima

Milestone: 2.1

comment:8 Changed 8 years ago by brucedechant

Submitted to sandbox/adsk/2.1 r4369

Note: See TracTickets for help on using tickets.