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

Performance Issues with draftActivate #30

Open
Kkoile opened this issue Oct 18, 2023 · 5 comments
Open

Performance Issues with draftActivate #30

Kkoile opened this issue Oct 18, 2023 · 5 comments
Assignees

Comments

@Kkoile
Copy link

Kkoile commented Oct 18, 2023

We encountered severe performance issues when activating a draft with sub entities, because of change-tracking plugin.

If a composite object with multiple sub entity instances is activated, each instance is read one by one from the database. See https://github.com/cap-js/change-tracking/blob/main/lib/entity-helper.js#L34
This leads to drastic performance issues in case there are a lot of sub entity instances. We encountered this, because a customer created 1000 sub entity instances and it took around a minute to activate the composite. Without having change-tracking plugin enabled it takes a fraction of a second.

I expect that db requests are reduced as much as possible and instances of one entity are read all together instead of a single instance basis.

@nkaputnik
Copy link
Contributor

Hello Nils,
we are aware of the subsequent database reads and will try to remove this behavior in subsequent iterations.
Please be aware that this initial release is an early adoper release and should not be used yet in productive use. Our intention is to gather as much feedback as possible to validate design, performance and scope, so we will be happy to listen to all incoming feedback for the next iteration.
Since this is an open source project, you're also welcome to contribute yourself and provide solutions to such issues.

Best,
Nick

@dinurp
Copy link

dinurp commented Nov 27, 2023

Dear Nick (@nkaputnik ),
You mention that this (v 1.03) is an early adopter release. Versioning with 1.x for an early adopter release is rather misleading. Could you please mention this in the documentation and share if there are any plans to production release.
Regards,
Dinu

@Kkoile
Copy link
Author

Kkoile commented Sep 30, 2024

Hi Nick (@nkaputnik ),

almost a year has passed and unfortunately the issue still exists. Do you still consider this plugin as "not ready for productive use"?
It would be great if you could increase performance for draftActive as this is a show stopper for us using this plugin.

Thanks,
Nils

Kkoile pushed a commit to Kkoile/change-tracking that referenced this issue Oct 7, 2024
Kkoile pushed a commit to Kkoile/change-tracking that referenced this issue Oct 7, 2024
@nkaputnik
Copy link
Contributor

Hello @Kkoile
this is an open source project maintained in our spare time.
We are concentrating our current efforts on working with non-single-ID keys and making the plugin work out-of-the-box in multi-tenant environments, where we are waiting on MTX to close a gap, so we are blocked here.
Fixing performance for draftActivate won't be tackled before we are done with the other topics.
You're very welcome to contribute yourself by analyzing the issue and suggest or even contribute a solution.

Best,
Nick

@Kkoile
Copy link
Author

Kkoile commented Oct 8, 2024

Please see the pull request I opened yesterday for fixing the performance issues: #126

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

3 participants