You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I actually found this issue when I was using EChart. The issue becomes very serious when I have a logic that tries to get image based on a variable. Size of globalImageCache keeps increasing after EChart's setOption.
When image is being loaded, pendingWrap from createOrUpdateImage is pushed to pending in globalImageCache.
I actually found this issue when I was using EChart. The issue becomes very serious when I have a logic that tries to get image based on a variable. Size of
globalImageCache
keeps increasing after EChart's setOption.When image is being loaded,
pendingWrap
fromcreateOrUpdateImage
is pushed topending
inglobalImageCache
.zrender/src/graphic/helper/image.js
Line 50 in fdd6008
The
pending
array is only cleared when the image is loaded successfully. For non-existing image, i.e. onerror, the array will not be cleared.Memory Increase:
![2018-04-27 00_26_47-image](https://user-images.githubusercontent.com/5885902/39350023-cddceddc-49b1-11e8-8fd7-3a321b42845e.png)
After I added a non-existing image 10 times
![2018-04-27 00_30_53-image](https://user-images.githubusercontent.com/5885902/39350202-45c2e75c-49b2-11e8-988d-e1816868152c.png)
After fix:
![2018-04-27 00_32_58-image](https://user-images.githubusercontent.com/5885902/39350283-90db15de-49b2-11e8-9485-f4b08e14f9dc.png)
JSFiddle Demo:
https://jsfiddle.net/kelvinau/y3axsx0w/
The text was updated successfully, but these errors were encountered: