FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Browser - Database updates on a separate thread

Open beckend opened this issue 2 years ago • 1 comments

Feature

Is your feature request related to a problem? Please describe. https://github.com/microsoft/FluidFramework/blob/f46c1c93fb56809fcd7182a36a9cbd89a00d4535/experimental/PropertyDDS/packages/property-dds/src/propertyTree.ts#L244 We are using SharedPropertyTree.commit with big updates, our UI freezes for a very long time. In short we are uploading tons of files then committing the change. Is it possible to do these things on a web worker? I don't think this is a uncommon case at all. It seems creating an instance in a worker is not really possible yet, since this depends on window:

    function generateRandomUInt32Array2(length) {
      const array = new Uint32Array(length);
      const crypto = window.crypto || window.msCrypto;
      crypto.getRandomValues(array);
      return array;
    }

Describe the solution you'd like Ability to create instances inside web workers, or having built in support to run callbacks spawned as worker tasks.

beckend avatar Oct 31 '23 04:10 beckend

PropertyDDS is an experimental data structure. We recently introduced a new SharedTree DDS that is a supported DDS now released as beta. While I am not sure you will be able to solve this specific issue, please consider trying it as we are investing in SharedTree moving forward. Check out https://aka.ms/fluid for more details.

nmsimons avatar Jan 23 '24 18:01 nmsimons

Hey @beckend, thanks for the question. Adding to what @nmsimons mentioned above, we are not looking to invest further in PropertyDDS and will be focusing on SharedTree DDS going forward, please look into that for your future development. Secondly, we are not planning to support updating the DDS data off the main thread at this point but we've noted your request.

kashms avatar Apr 10 '24 05:04 kashms