-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Fix performance issue in CoroutineDescendantAxis #609
Comments
It seems in the |
Hello, @JohannesLichtenberger, just realized that perhaps it was not clear that I looked into this issue eventually. So I specifically added a timestamp in the testAxisConventions in AbsAxisTest. |
I think the implementation itself is not good. First of all the producer seems to explicitly block until it's finished and only afterwards the next right sibling of a node during preorder is traversed to send the nodes to the axis. Second, AFAICS in the producer itself the right sibling key stack is used instead of a kind of fork join approach. I'm also not sure if thread synchronization itself might be an issue as well as starting of new transactions... Maybe there's also a better approach for parallelization of preorder traversal with the DOM like pointer based encoding (firstChild/lastChild/rightSibling/leftSibling/parent) of every node. The other issue with the slow IO using based backend might also be interesting... |
Still open ? |
Yes, but it's completely broken. It should check for each right sibling if it's on the same page or another one. If it's in a different page, it should fetch this page in parallel and traverse this subtree already. |
@xDido further clarification needed? |
@JohannesLichtenberger I'm not working on the issue at the moment. I tried to read the code multiple times, but I'm just a bit busy with Midterm exams. I will probably start looking again on the 27th of October. |
https://github.com/sirixdb/sirix/blob/master/bundles/sirix-kotlin-api/src/main/kotlin/org/sirix/axis/CoroutineDescendantAxis.kt
It should read mainly from the page cache (BufferManagerImpl => caches) / in the test, actually always, but I assume it'll make I/Os all the time. That's why it's more than 100x slower than the standard "serial" DescendantAxis.
The idea of the axis is to prefetch right sibling nodes in parallel in a second read-only trx.
So we'll have to debug and profile...
The text was updated successfully, but these errors were encountered: