Performance with lots of shape sources in React Native #3932
Unanswered
neilpmyers
asked this question in
Q&A
Replies: 1 comment
-
|
Having a similar issue, still haven't found a solution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I am working on a project that displays several hundred ShapeSources with 1 LineLayer and FillLayer each at a time. They are created with certain values at runtime and stored in an array that is displayed in a MapView.
While the actual performance of the app takes a hit, the big problem is that each ShapeSource has an on press event that has a considerable delay before it is triggered. Even if I just have a console.log output, there is anywhere from 1-15 seconds of delay before it executes. No other parts of the code are delayed while it is processing this, and if I press multiple then they are displayed in the correct order with the delay from the press actually happening. I have lowered the buffer to 60 and tolerance to 0.9 (I tried more extreme numbers and didn't notice an improvement).
And yes, with way less ShapeSources the delay gets way smaller and almost disappears. The problem is I do not yet know a good way to portray what I am trying without using ShapeSources. I am showing just simple boxes to display certain data sets and considered using point annotations or images (or alternative) but the github pages say that ShapeSource has the best performance in mass quantities.
Any help would be massively appreciated.
Beta Was this translation helpful? Give feedback.
All reactions