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

Poor performance of rapid property updates #725

Open
j-mok opened this issue Mar 28, 2024 · 0 comments
Open

Poor performance of rapid property updates #725

j-mok opened this issue Mar 28, 2024 · 0 comments

Comments

@j-mok
Copy link
Contributor

j-mok commented Mar 28, 2024

We have come across some performance issues on VC startup, and it turned out there was high database traffic related to updates on some properties. In our setup we run a "seeding" procedure on one of our modules initialization which ensures that a set of well-known properties exists and they are configured in a fixed way. We do that by iteratively going over each property and executing simple load-or-create -> update -> save steps.

This takes quite long and after examining Catalog's code we found out that when getting even a single property through IPropertyService, a cache miss causes all properties to be pre-loaded. This, combined with the fact that SaveChangesAsync() expires CatalogCacheRegion which is used for property caching, makes rapid load->modify->save loop on multiple individual properties very inefficient. It is actually slower than not having a cache at all, since loading a single property on a cache miss means loading all of them.

Version info:

  • Platform version: 3.800.12
  • Module version: 3.803.0

Expected behavior

Efficient loading and persistence of individual properties.

Actual behavior

Prohibitively high database traffic and no caching effect when repeatedly modifying individual properties.

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

No branches or pull requests

1 participant