Hierarchical Viewer Performance

Louise O'Hara asked on December 4, 2015 10:40

I have implemented a hierachical viewer in order to display multiple levels of content in a javascript menu. The child pages contain a mix of 2 document types and linked documents. There are several hundred pages across up to 8 levels.

My issue is the speed of page load. I have set the columns and page/web part cache but they dont seem to make much of a difference.

Can anybody advise how to improve performance or a better option?

Recent Answers

Dawid Jachnik answered on December 4, 2015 12:36

Hello Louise,

Which columns do you use? If you use only document or node specified columns you can try change the Universal viewer to Universal viewer with custom query (remember: if you use this web part always include these columns: NodeID,NodeLevel,NodeParentID), which give you possibility to write your own query, which will load data from the view_cms_tree_joined or other table without using UNION or JOIN. It should speed up your menu. Another great option which you can do is setup custom Cache item name. BY default your hierarichical viewer is cached on every page with another cache item name, by setup properties Cache item name in the web part properties you can set one chace item name for whole website.

1 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on December 4, 2015 14:43

Louise, I had similar issue with universal viewer while building documents tree on the live site. So I ended up loading first 2 levels on page load, and loading all the others dynamically with AJAX. Check this blog for some ideas for implementation of this.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 4, 2015 17:36

What version are you using? In v8 and up there are significant improvements in how you can load your transformations. Also do you have any custom transformation methods in your transformations? I've implemented the Hierarchical and Universal Viewers on sites with thousands of pages and have no issues with performance as long as you specify the columns and you can also disable the view state. I'd check out the debug part of the site, this will give you specific details as to what is actually causing the delay. It might not be the webpart at all and something else totally different.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on July 22, 2016 21:20

Old question, but i'll put in my two cents.

The issue is when you join different page types. The Hierarchy Viewer does joins on the tables (the more page times, the larger the table), and sends all that from database over to the client and THEN applies the columns. This can result in megabytes of data sent over.

ALthough i'm kicking myself becuase i can't find the query i wrote, i ended up using this query that was showing so large, and rewriting a custom query that only selected the columns i needed, and set "null" for the column variations and just did a UNION ALL (much faster) and applied the where conditions, etc manually. This meant it did the logic on SQL, and only sent the results, not the entire join and apply reuslts later.

I really must make an updated Hierarchy viewer to automatically handle this better...

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.