Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

Re: Balancing unbalanced Pages tree

$
0
0

Interestingly, I wrote a simple balancer for this file (simply divides into N nodes of N elements, where N~=sqrt(nodes). So N is about 100 in this case; not an optimal tree, but a quick balancing act. This balancing is not as heavyweight as I expected, just taking a few seconds. And once done, performance on this file returns to normal; before it would take several minutes just to delete a page, or iterate through all pages. Since it does not alter pages (except the Parent key of each Page dictionary) there does not seem to be any notification required.

 

Can you think of any downside to this little trick?


Viewing all articles
Browse latest Browse all 10848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>