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

Transform to Rest Performance #141

Closed
philippguertler opened this issue Sep 15, 2017 · 0 comments
Closed

Transform to Rest Performance #141

philippguertler opened this issue Sep 15, 2017 · 0 comments

Comments

@philippguertler
Copy link
Contributor

Gentics Mesh Version, operating system, or hardware.

  • v0.10.2

After profiling a migration I noticed that one method was called much more often than expected and took about 15% of the total CPU time during the migration. The method is MicronodeImpl:getParentNode()

This method was called for every field in every micronode or node (about 20k invocations for a migration of about 650 nodes). It is called because HTML fields could need the project name if there is a link which has to be resolved.

There are a few Problems with that method:

  • The parent is actually not needed at all. It is only used in String/HTML Field transformation if link resolving is performed. And even then, only the project name is fetched from the node.
  • The algorithm for fetching the node is very inefficient, because it traverses all versions to find the newest version.

This very specific use case causes significant performance issues every time a node is transformed to JSON, which includes every read request for a node and also for schema migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants