Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reactivity overload (frozen UI when displaying lots of files while developing in web-app-files) #5311

Merged
merged 3 commits into from
Jun 21, 2021

Conversation

fschade
Copy link
Contributor

@fschade fschade commented Jun 18, 2021

Description

when a lot of files are displayed in files table, the web ui lacks.
This happens because we update a reference to a files object, even if we clone the collection by using the spread operator
[...this.object] child objects are still passed by reference not value.

The update event then gets triggered multiple times even if it's not needed.... resulting with a frozen ui.

This only happens in dev mode because of strict mode and outside mutation:

const strict = process.env.NODE_ENV === 'development'

we also hammer vuex by adding the full resource on every mutation, this pr also adds the ability to update certain resource keys only.

Related Issue

  • no issue, was discussed in rocket-chat and be treated as a kind of fastlane item

Motivation and Context

have a snappy ui ;)

How Has This Been Tested?

  • local installation with 4k of dummy files

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • [-] Unit tests added not now, will be done in the process of typescript migration
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Jun 18, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISRename failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISFiles2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISBasic failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISSharingBasic failed. The build is cancelled...

@fschade fschade force-pushed the fix-file-reactivity-overload branch from 813cfd3 to 06e196d Compare June 18, 2021 19:52
@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISSharingInternalGroups failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISFiles2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISSharingBasic failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISFiles1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISSharingInternalUsers2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests XGAPortrait1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests XGAPortrait2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingInternalGroups failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISSharingInternalUsers2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingInternalGroupsSharingIndicator failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/16584/

webUISharingInternalGroupsSharingIndicator-shareWithGroups-feature-114.png

webUISharingInternalGroupsSharingIndicator-shareWithGroups-feature-114.png

webUISharingInternalGroupsToRootSharingIndicator-shareWithGroups-feature-104.png

webUISharingInternalGroupsToRootSharingIndicator-shareWithGroups-feature-104.png

💥 Acceptance tests SharingInternalGroupsSharingIndicator failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests IntegrationApp1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIFiles2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIOCISRename failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPermissionToRoot failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPublicManagement failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/web/16589/

webUISharingPublicManagement-publicLinkIndicator-feature-12.png

webUISharingPublicManagement-publicLinkIndicator-feature-12.png

webUISharingPublicManagement-publicLinkIndicator-feature-27.png

webUISharingPublicManagement-publicLinkIndicator-feature-27.png

webUISharingPublicManagement-publicLinkIndicator-feature-37.png

webUISharingPublicManagement-publicLinkIndicator-feature-37.png

💥 Acceptance tests SharingPublicManagement failed. The build is cancelled...

check if resource has a usershare, if not skip LOAD_INDICATORS
use UPDATE_RESOURCE_KEY wherever posible
use getIndicators to obtain if a resource has an indicator
@fschade fschade force-pushed the fix-file-reactivity-overload branch from 8ef3273 to 1770346 Compare June 19, 2021 05:42
@pascalwengerter pascalwengerter changed the title web-app-files get frozen when displaying lot of files while developing Fix reactivity overload (frozen UI when displaying lot of files while developing in web-app-files) Jun 21, 2021
@pascalwengerter pascalwengerter changed the title Fix reactivity overload (frozen UI when displaying lot of files while developing in web-app-files) Fix reactivity overload (frozen UI when displaying lots of files while developing in web-app-files) Jun 21, 2021
@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingInternalUsersRoot2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingPublicBasic failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISResharing1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingFolderAdvancedPermissionMU failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests IntegrationApp1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests SharingFolderPermissions failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests webUIFiles1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISSharingPublic failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests OCISSharingInternalGroups failed. The build is cancelled...

@sonarqubecloud
Copy link

@kulmann kulmann merged commit 479643f into master Jun 21, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-file-reactivity-overload branch June 21, 2021 12:36
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.

3 participants