First attempt to use less resources

This commit is contained in:
Pieter Vander Vennet 2022-03-02 16:00:02 +01:00
parent f3dac0d429
commit 9574259e75
4 changed files with 26 additions and 6 deletions

View file

@ -49,7 +49,7 @@ export default class FilteringFeatureSource implements FeatureSourceForLayer, Ti
self.update()
})
this._is_dirty.stabilized(250).addCallbackAndRunD(dirty => {
this._is_dirty.stabilized(1000).addCallbackAndRunD(dirty => {
if (dirty) {
self.update()
}

View file

@ -54,8 +54,8 @@ export class NewGeometryFromChangesFeatureSource implements FeatureSource {
// In _most_ of the cases, this means that this _isn't_ a new object
// However, when a point is snapped to an already existing point, we have to create a representation for this point!
// For this, we introspect the change
if (allElementStorage.has(change.id)) {
// const currentTags = allElementStorage.getEventSourceById(change.id).data
if (allElementStorage.has(change.type + "/" + change.id)) {
// The current point already exists, we don't have to do anything here
continue;
}
console.debug("Detected a reused point")