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've already read all issues about performance problems with many features but I feel like there is something missing. The performance problem is there only on the first load of the geoJSON to the VlSourceVector, then after ~10-20 seconds everything works smooth (zooming, rotating, moving).
I've tried to test the loading with Chrome built-in performance tab and it shows
that the function which takes 18 seconds is difference() used here:
But i can't understand what this function is trying to compare and delete on the first (initial load of the features). Not sure if it is a bug or correct behaviour.
The text was updated successfully, but these errors were encountered:
Hello @lol2x ,
interesting result... difference is used to find features that is in the OpenLayers Vector source but not in the new features prop value. However on the first load the source is empty, difference shouldn't take so much time. I need to review this place...
Thanks for investigation!
Hi @ghettovoice,
I've taken the code from the branch you created and the results are great! now whole task (for the same dataset) takes less then 4 seconds (previously almost 23 seconds)
New chrome performance screenshot:
out of curiosity:
do you think that it will be possible to delegate whole task of reading features to webworker? Will be great to load them without blocking the main thread.
lol2x
changed the title
Performance when fist loading many features.
Performance when first loading many features.
Mar 7, 2022
do you think that it will be possible to delegate whole task of reading features to webworker? Will be great to load them without blocking the main thread.
Hard to say for me...
As I know they allow passing as message only simple data. So I see only the opportunity to move to the worker only a part of resolving list of add/remove features, but the actual add/remove still need to be done in the main thread. I doubt that it's worth it.
Maybe I wrong, because I don't much experienced with webworkers and especially in Vue env.
I've already read all issues about performance problems with many features but I feel like there is something missing. The performance problem is there only on the first load of the geoJSON to the VlSourceVector, then after ~10-20 seconds everything works smooth (zooming, rotating, moving).
I've tried to test the loading with Chrome built-in performance tab and it shows
that the function which takes 18 seconds is difference() used here:
vuelayers/src/mixins/vector-source.js
Line 646 in e965804
But i can't understand what this function is trying to compare and delete on the first (initial load of the features). Not sure if it is a bug or correct behaviour.
The text was updated successfully, but these errors were encountered: