-
1. Re: Navigation move takes too long
hoang_to Jan 8, 2013 3:35 AM (in response to jan-tilo)Could you describe how navigation nodes were created?
-
2. Re: Navigation move takes too long
jan-tilo Jan 8, 2013 4:33 AM (in response to hoang_to)The navigation nodes are written into JCR, means a "mop:navigation" item and its children are written into the portal-system workspace.
The nodes are created below an invisible navigation node.
After all nodes are created, the nodes are moved to be sctive by using the NavigationService.
This approach currently works ok, if the amount of created nodes is low.
-
3. Re: Navigation move takes too long
hoang_to Jan 9, 2013 5:03 AM (in response to jan-tilo)We are investigating the issue and would feedback you as soon as possible.
-
4. Re: Navigation move takes too long
hoang_to Jan 10, 2013 4:54 AM (in response to jan-tilo)@Jan:
Did you move the node with Cut&Paste instead of Copy/Paste? I tried to move a node with about 1000 descendents to another node and see that the changes is persisted quickly.
Anyway, while i created a node with 1000 children for such test (via my own tool which relies on NavigationService), i noticed that:
1. It took not much time to create the first 600 children
2. It took much much much time to create the next 400 children
CPU record from JProfiler told me that the bottleneck is index-stuff in JCR
-
5. Re: Navigation move takes too long
jan-tilo Jan 11, 2013 6:58 AM (in response to hoang_to)Hi,
I tested the following:
I moved the node with Cut&Paste. The Frontend shows the message "saving". This takes about 30sec-1min. I can see the change in this admin view (Edit Navigation). Afterwards I refreshed the portal. The navigation is not changed. Then I opened "Edit Navigation" again. The changes are not shown.
I also can see, that CPU load is high, also after the save is finished. If I access the portal after the CPU load decreases the navigation is changed.
Second test:
I move the navigation by using NavigationService/NavigationContext. I take a node and put it below another node(NodeContext.add(null, otherNode)). Afterwards I call NavigationService.save().
I inspected the same result. NavigationService.save finishes after 1-2min. The persistence in JCR changes later (1-2hours).
Do you know any other API/Service function to manipulate my navigation?
-
6. Re: Navigation move takes too long
hoang_to Jan 11, 2013 10:32 AM (in response to jan-tilo)Jan Tilo Henseler wrote:
Hi,
I tested the following:
I moved the node with Cut&Paste. The Frontend shows the message "saving". This takes about 30sec-1min. I can see the change in this admin view (Edit Navigation). Afterwards I refreshed the portal. The navigation is not changed. Then I opened "Edit Navigation" again. The changes are not shown.
I also can see, that CPU load is high, also after the save is finished. If I access the portal after the CPU load decreases the navigation is changed.
Second test:
I move the navigation by using NavigationService/NavigationContext. I take a node and put it below another node(NodeContext.add(null, otherNode)). Afterwards I call NavigationService.save().
I inspected the same result. NavigationService.save finishes after 1-2min. The persistence in JCR changes later (1-2hours).
Do you know any other API/Service function to manipulate my navigation?
I used Crash (our command line tool to access/manipulate JCR nodes) to check the persistence and saw that moving a node containing 1000 children to other node (using Cut&Paste) was done quickly.
My test environment is: GateIn 3.6.M01-SNAPSHOT (which is not diff from GateIn 3.5 in term of nav service) + Tomcat 7 + MySQL
To manipulate navigation, you could use https://github.com/crashub/crash . Just deploy the .war generated from artifact jcr/exo and connect to Crash agent via command telnet localhost 5000
You could also use my service component https://github.com/mto/gatein-data-injector to manipulate via JConsole
-
7. Re: Navigation move takes too long
hoang_to Jan 22, 2013 10:00 PM (in response to jan-tilo)@Jan: Could you describe your test environment (Server, DB, memory configuration) and layout of your moved navigation?
-
8. Re: Navigation move takes too long
hoang_to Jan 23, 2013 1:46 AM (in response to hoang_to)Environment: GateIn 3.6.0-M01-SNAPSHOT + MySQL
I moved 1000 nodes using Cut/Paste as illustrated in screenshots and it took about 2 minutes to persist move action
1. firstLevel node has 4 children and each child has 200 children
2. Move firstLevel node to newFirstLevel node (using Cut/Paste and click on Save button)
3. As two minutes elapsed (clock at top-right corner of my screen), reopen the navigation management popup to see the change persisted
-
9. Re: Navigation move takes too long
hoang_to Jan 23, 2013 1:49 AM (in response to hoang_to)JProfiler snapshot for above move action in attached file
-
10. Re: Navigation move takes too long
nfilotto May 23, 2013 7:43 AM (in response to jan-tilo)This will be fixed by this issue https://jira.exoplatform.org/browse/JCR-2125#comment-248812