Skip to content

Optimizing file upload speed by reducing the number of API calls#764

Draft
heinrich-ulbricht wants to merge 1 commit intopnp:devfrom
heinrich-ulbricht:optimize-file-upload-speed-now-really2
Draft

Optimizing file upload speed by reducing the number of API calls#764
heinrich-ulbricht wants to merge 1 commit intopnp:devfrom
heinrich-ulbricht:optimize-file-upload-speed-now-really2

Conversation

@heinrich-ulbricht
Copy link
Contributor

This contains the following parts:

  1. caching folders that have already been loaded
  2. bundling some property requests into one call
  3. skipping PublishFileToLevel if the level is already met

This speeds up uploading of files if they go to the same folder. I'm uploading dozens, sometimes hundreds of file to the same folder. This used to take about 1,5-2 seconds per file. With those changes it's down to 0,75-1 second. (Rough estimate by looking at the console timestamps.) So this is now ~twice as fast.

But I'm creating this pull request as draft because I'm not entirely sure point 3 from the list is correct (this is about PublishFileToLevel). It looks correct but I don't know if this causes side effects to disappear that are actually needed somewhere. Maybe somebody can confirm that it is ok to check the existing level before trying to adjust it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant