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 after Adding Headless Modus #316

Closed
drfho opened this issue Oct 3, 2024 · 3 comments
Closed

Performance after Adding Headless Modus #316

drfho opened this issue Oct 3, 2024 · 3 comments
Assignees

Comments

@drfho
Copy link
Contributor

drfho commented Oct 3, 2024

Ref: 0e13c11

Exactly this change-set massivly reduces the performance of attribute listings like in the "Meta-Attribute":
/content/metaobj_manager/manage_metas?lang=ger
The creation of the table usually tales 0.2s, now it takes a least 12s

The latency is due to the modification in _cachemanager.py
0e13c11#diff-93d213afd35022330e5586bb4981eca832e4420321cdcd98646286dc2dd11c86

image

If this change is revoked, the performance gets to expected speed, about.

image

Actualy when iterating the metadict there will be an intense ping-pong of fetchReqBuff() and storeReqBuff() which costs a lot of time. Now, because self=content the request will be alsways created new by standard.create_headless_http_request(). In fact, this is not needed here at all.

image

So we need a solution to avoid any redundant creation of the REQUEST-Object, that is just needed for headless requests and not ordinary usage of ZMS. Maybe as global var the is just created once on startup?

@cmeier76
Copy link
Member

cmeier76 commented Oct 3, 2024

@drfho Maybe we should create the fallback REQUEST object before store/fetchReqBuff and pass it as parameter...

...I will check this ASAP.

Meanwhile you can revert the both destructive calls in main branch - we do not rely on this at the moment.

@cmeier76
Copy link
Member

cmeier76 commented Oct 3, 2024

@drfho Your fix ac35c27 does work for the CMSAPI with object-relational mapping from ZODB to PostgreSQL as well - with a performance boost by factor 3. Thank you very much for spotting this issue!

@cmeier76
Copy link
Member

Fixed by #322

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

4 participants