volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

IContentRepository.Move performance speed up

Hello, im having problems with the performance for a EventListner. I want to speed up the performance, currently it takes around 10 seconds to publish the PageType, in the eventListner I automatically create a map structure. At maximum it creates 3 containers/maps with a hierarchy order and moves the PageType in the bottom of the hierrarchy. After debugging I discover that the IContentRepository.Move slows the method down. Here is my code:

Let me know if you need more information


#311863
Edited, Nov 02, 2023 9:49

The most common way to move forward in this case is to use a profiler like dotTrace to see what is the bottleneck. if it's something we can improve from our side, we'd like to hear about it.

#311864
Nov 02, 2023 9:57

Don't you have an infinite loop here? Shouldn't path != eventPage.ContentLink be path != eventPage.ParentLink? Or even better path.Equals(eventPage.ParentLink, ignoreVersion: true).

#311925
Nov 03, 2023 9:07

Also, why are you casting SaveAction.Publish to the AccessLevel enum?

#311926
Nov 03, 2023 9:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.