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
check number of DOM nodes (green line in performance report)
Expected Behavior
The number of DOM nodes should be constant.
Actual Behavior
Number of DOM nodes (green line in performance report ) constantly rises with each source update. In case of fast animation using requestAnimationFrame, after some time DOM garbage collector is called, caused noticeably longer animation frame ("freezing").
The cause is the method browser.resolveURL(), which creates new A element out of the document tree only for the purpose of the url normalization.
The easiest solution would be to make url resolving optional (I guess it's not needed especially in case of object URLs). Or rewrite the method resolveURL() to reuse the anchor element node, if possible....?
Anyway, thank you for the great piece of software!
The text was updated successfully, but these errors were encountered:
poletani
changed the title
The number of DOM nodes is rising when setData(URL) is called frequenty
The number of DOM nodes rises when setData(URL) is called frequenty
Mar 13, 2019
Thanks for the report! I'm wondering why it's not garbage-collected if a goes out of references at the end of resolveUrl and isn't attached to the DOM anywhere.
mapbox-gl-js version: 0.53.1
browser: tested in chrome, but possibly in all browsers
Steps to Trigger Behavior
Expected Behavior
The number of DOM nodes should be constant.
Actual Behavior
Number of DOM nodes (green line in performance report ) constantly rises with each source update. In case of fast animation using requestAnimationFrame, after some time DOM garbage collector is called, caused noticeably longer animation frame ("freezing").
The cause is the method browser.resolveURL(), which creates new A element out of the document tree only for the purpose of the url normalization.
The easiest solution would be to make url resolving optional (I guess it's not needed especially in case of object URLs). Or rewrite the method resolveURL() to reuse the anchor element node, if possible....?
Anyway, thank you for the great piece of software!
The text was updated successfully, but these errors were encountered: