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 have a 3D point cloud visualization with the following requirements:
Dataset size: +1 million points
Two modes:
Play/Live mode: No filtering needed, performance is critical
Pause mode: Spatial filtering (clipping) by bounding box
I'm using DataFilterExtension with filterSize: 3 for XYZ coordinates and toggling filterEnabled between the two modes.
Question
Does getFilterValue get called for all data points even when filterEnabled: false?
I'm concerned about performance in live mode where filtering is disabled but the extension is still present on the layer.
Current Implementation
constextension=newDataFilterExtension({filterSize: 3});// Mode changes between play and pauseconstshouldFilter=!isPlaying&&isClippingEnabled;newPointCloudLayer({data: {length: 1000000,/* ... */},extensions: [extension],filterEnabled: shouldFilter,// true in pause, false in playfilterRange: clipBounds,getFilterValue: (d,info)=>{// This involves array access and position calculation
...
returnposition??null;},});
Concerns
Is getFilterValue invoked when filterEnabled: false? If yes, this could cause performance issues with +1M points being processed unnecessarily every frame.
Should I use a different approach?
What's the best practice for conditionally enabling/disabling filtering on large datasets?
Alternative Approaches Considered
Two separate layers - one with extension, one without, visualize conditionally
Questions
Is DataFilterExtension appropriate for this use case?
What's the performance impact of keeping the extension with filterEnabled: false?
What's the recommended pattern for toggling filtering on/off with large datasets?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use Case
I have a 3D point cloud visualization with the following requirements:
I'm using
DataFilterExtensionwithfilterSize: 3for XYZ coordinates and togglingfilterEnabledbetween the two modes.Question
Does
getFilterValueget called for all data points even whenfilterEnabled: false?I'm concerned about performance in live mode where filtering is disabled but the extension is still present on the layer.
Current Implementation
Concerns
Alternative Approaches Considered
Two separate layers - one with extension, one without, visualize conditionally
Questions
Is DataFilterExtension appropriate for this use case?
What's the performance impact of keeping the extension with filterEnabled: false?
What's the recommended pattern for toggling filtering on/off with large datasets?
Any guidance would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions