Replies: 6 comments 3 replies
-
if we use a big cache number, does it have a better way ? |
Beta Was this translation helpful? Give feedback.
-
Rerender is always required when viewports change, however frequently it is. If you don't rerender then you won't see any visual feedback during drag and zoom. |
Beta Was this translation helpful? Give feedback.
-
Before jumping to conclusions, I suggest that you describe how you are using the TileLayer, and if possible, the relevant code. It’s very possible that you can simply tweak your own usage pattern to improve performance. If you do think a particular operation in the render cycle is causing the problem, you can use the profiler tool to demonstrate that it's taking significant CPU time. |
Beta Was this translation helpful? Give feedback.
-
Sorry for that it was not caused by the viewport array. Our team member makes this image. After this profiling, You can see the fps drop very clearly when drag/move. |
Beta Was this translation helpful? Give feedback.
-
Description
Tiles layer performance issue with layer update.
Expected Behavior
Repro Steps
Github: [source code](https://github.com/peaceshi/tiles-layer-test/deployments/activity_log?environment=Production) that reproduces the behavior
Vercel: example
Environment
Seems like should not use

!==
to compare toObjects
, because of that will always return ture.Only primitive type can use it.
deck.gl/modules/react/src/deckgl.js
Line 79 in 38149ae
Then it will be
forceUpdate
the whole react dom every time when drag or move because it makes a new viewport.And redraw redraw and redraw frequently that causes a bad performance.
deck.gl/modules/react/src/deckgl.js
Line 83 in 38149ae
So that ,when call rebuildViewports(), we set
this._viewports.length = 0
maybe a way to fix it.deck.gl/modules/core/src/lib/view-manager.js
Line 295 in 38149ae
Beta Was this translation helpful? Give feedback.
All reactions