Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

SiteSync: speedup of starting process #3280

Merged
merged 11 commits into from
Jun 15, 2022
Merged

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Jun 3, 2022

Brief description

Enabled Site Sync increased loading time of Tray and manipulations in Loader quite significantly on slow (Mongo on Cloud) connection.

Description

Most expensive operation is to get all Site Sync enabled projects as its pulling project settings for all projects. This was moved into thread, so it is not blocking start. (For specific customer with cloud Mongo stationed far away get_project_settings takes about 3 seconds :/)
Currently this check is being done on every loop (to start syncing as soon as project is enabled), if this would be problematic, resolving this only once Tray session would need to be implemented.

Testing notes:

  1. Everything should work as before with Site Sync, just slightly faster on cloud MongoDB

setSortable forces refresh itself
Do creation of settings only in Thread as it is expensive operation.
Let only thread do it, expensive operation potentially.
@kalisp kalisp requested review from 64qam and iLLiCiTiT June 3, 2022 12:10
@kalisp kalisp self-assigned this Jun 3, 2022
Copy link
Member

@mkolar mkolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to tell how much difference it makes, but I can attest that at the very least everything seems to work for me.

Copy link
Member

@64qam 64qam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works on our cloud mongo. However, when using client cloud DB it is almost impossible to work with. Everything is extremely laggy.

@kalisp kalisp merged commit 310b338 into develop Jun 15, 2022
@kalisp kalisp deleted the bugfix/site_sync_start_speedup branch June 15, 2022 09:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants