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
The viewer becomes data-intensive due to the repeated requests for property files, which are not cached and must be retrieved anew each time properties need to be accessed.
Suggested solution 💡
In the FragmentsGroup class, which contains the getProperties method that appears to be the primary function for retrieving properties, we could implement a caching system same as the one used for geometries.
Alternative ⛕
importDexiefrom"dexie";interfaceIStreamedFile{id: string;file: JSON;}exportclassStreamFileDatabaseextendsDexie{// Declare implicit table properties.// (just to inform Typescript. Instantiated by Dexie in stores() method)files!: Dexie.Table<IStreamedFile,string>;// number = type of the primkeyconstructor(){super("MyAppDatabase");this.version(1).stores({files: "id, file",});}}exportclassFragmentsGroupextendsTHREE.Group{private_fileCache=newStreamFileDatabase();privateasyncgetPropertiesData(url: string){constfound=awaitthis._fileCache.files.get(url);if(found){returnfound.file;}else{constfetched=awaitfetch(url);constfileData=awaitfetched.json();this._fileCache.files.add({id: url,file: fileData.data});returnfileData&&fileData.data ? fileData.data : null;}}
Description 📝
The viewer becomes data-intensive due to the repeated requests for property files, which are not cached and must be retrieved anew each time properties need to be accessed.
Suggested solution 💡
In the FragmentsGroup class, which contains the getProperties method that appears to be the primary function for retrieving properties, we could implement a caching system same as the one used for geometries.
Alternative ⛕
Additional context ☝️
No response
Validations ✅
The text was updated successfully, but these errors were encountered: