-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I encountered a performance issue about vuelayers... #196
Comments
Hi @jerry1108 , My suggestion is do not use Here is simple example https://jsfiddle.net/ghettovoice/qvxr1hLn/ |
Hi @ghettovoice : |
I have made update to this example https://jsfiddle.net/ghettovoice/qvxr1hLn/ |
@ghettovoice |
The most easy and flex solution for dynamic styles is the so called style function. |
@ghettovoice : |
@ghettovoice : |
@ghettovoice : I move the pointsStyleFunc to comuted block, and all points disappear... Why? |
Maybe you make computed property a bit incorrect, it should return the function that return style function. ...
computed: {
pointsStyleFunc () {
return () => feature => {
// style function body
}
},
},
... But with the latest version v0.11.5-beta.3 you don't actually need this, because here was fixed several issues related to feature updates. |
@ghettovoice : |
Because in the v0.11.4 only the array changes are tracked, not internal feature properties. But If you have a lot of frequent changes for features, the only really effective way to work them is avoid using Vue at all, i.e. exclude using of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
dear @ghettovoice :
I encountered a performance issue about vuelayers.
At present, there are 600 points and 33 line-strings on my map.
I let the lines appear when zoom >= 15 && zoom <= 19 and those points appear when zoom >= 20.
While I zoom in the map, those lines disappear and the points appear after about 2~5 seconds and thus the action causes a little lag.
While I zoom out the map, those points disappear and the lines appear after about 2 seconds and thus the action also causes a little lag. (but sometimes the lines can't appear and the points can't disappear...)
These two conditions both cause the CPU rate to raise vary high. Especially in first scenario. So my customer always complain about the bad user experience.
Could you do me a favor to check if there is something wrong or wierd in my codes?
However if I let the point amount lower to about 250, the lag situation has gone.
I discuss with my colleague who had implement the original openlayers map and he said he added over 5000 points (feature layer) on the map, it worked well while dragging or zooming-in or zooming-out the map.
So I wonder if I write out the bad codes or something else??? I don't understand. :((
The text was updated successfully, but these errors were encountered: