Skip to content

Poor performance of rapid property updates #725

@j-mok

Description

@j-mok

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions