Jumoo / uSync.Complete.Issues

Public Issue tracker and roadmap for uSync.Complete
https://jumoo.co.uk/usync/complete/
2 stars 1 forks source link

Massive performance issue when saving content after installing Usync Complete #218

Open arknu opened 7 months ago

arknu commented 7 months ago

We have a site with about 160,000 nodes, of which about 20,000 are published. Most of these nodes are of a single type, under one parent (a bunch of job postings imported from external systems). These are excluded from uSync.

After installing uSync Complete, we are seeing massive performance degradations when saving normal content (not job postings). Save times go from 7-8 seconds to 30-60 seconds. Of course uSync has to do some processing when saving, but this seems excessive. We have had to remove uSync for the time being to restore performance to acceptable levels.

Version:

Expected behavior I would expect Save performance to be minimally impacted by installing uSync, maybe taking an additional 1 or 2 seconds.

KevinJump commented 7 months ago

Hi,

Sorry that there appears to be an an issue here 😞 -

First Thing , the 'fix'

You can disable uSync.Complete's caching (which i suspect is the root cause of the slow down). clicking on caching in the publisher dashboard, will show you a disable button, that will tell you to do the following in the appsettings.json file.

{
  "uSync": {
    "Complete": {
      "Caching": {
        "Enabled": false
      }
    }
  }
}

But actually you are right even with caching enabled this shouldn't slow the site down as much as it appears to be doing for you. when you save/publish an item,. uSync cache works out the dependencies on an item, for most content that will be the datatype, and some media items, if maybe a page is linking to 1000's of media items that would slow it down.

but on 'normal' content we wouldn't expect this to add much time at all.

We are looking into this, - if you have any insights on the type of pages / how much media / properties they have, then that might help us a bit.

bielu commented 5 months ago

@KevinJump I think it might be related to umbraco core issue based on umbraco versions, not to usync complete. There is whole treat about it, https://github.com/umbraco/Umbraco-CMS/issues/14842 and https://github.com/umbraco/Umbraco-CMS/issues/14936. @arknu are you using Block Grid / Block Editor / Nested Content at any of this nodes? if so it is bug cause by umbraco core not usync complete, Usync will only make it worst because it is using same api :)

KevinJump commented 5 months ago

Good spot, but i think mostly this issue is how we calculate the dependency chain for items when they are saved (hence turning of the cache makes a diffrence). part of the dependency calculation looks at siblings, and if a page has a lot (like 100's) then it can slow down the save.

we have a fix where we basically don't cache the sibling dependency check, (its not always needed for publish anyway) - it will be in the next release when it drops.

bielu commented 5 months ago

@KevinJump yeah it make sense, but i noticed big slow down even without usync, installing usync coplete made it worst and I noticed a lot of additional timings related to other ticket

arknu commented 4 months ago

@KevinJump Sorry for taking so long to get back to you on this. Other development priorities on the site in question meant we just removed uSync complete for the time being.

Now, we are able to have a look at this issue again. I have tried changing the config as described and we're waiting for feedback from the customer. But my initial impression is that saving is still slow, although better.

If it would be of use to you, we can supply you with a copy of the database for you to test with.

KevinJump commented 4 months ago

Hi,

If the caching is off, (you can confirm this in the publisher dashboard, top right-hand corner 'caching' tab).

Then uSync.Complete does nothing when you save or published an item 🤔

uSync (the core product) will be saving a single file to disk when things are saved (unless [you have turned content off,] (https://docs.jumoo.co.uk/usync/uSync/guides/content) and then that too will do nothing).

If you want to send anything over, then please do kevin@jumoo.co.uk,

We can take a look, but often performance issues can be more than the DB, and are disk related 😞 I am guessing if you are on azure, you have looked at the umbraco azure setup steps? these can make a big difference

but also, any logs you might have would be useful.

arknu commented 4 months ago

@KevinJump I have a feeling that we're hitting these bugs that are fixed in Umbraco 13.2: https://github.com/umbraco/Umbraco-CMS/issues/14936, https://github.com/umbraco/Umbraco-CMS/issues/14842.

We will upgrade to 13.2 and test again. It may not be uSync causing these issues directly.

bielu commented 4 months ago

As mentioned earlier, usync would be affected by this issues :) so most likely it will be resolved :) but let me know if you not! I can help you do profiling on it to help Kevin figure out what is wrong.