Skip to Main Content

how to speed up printing large tree

3300579Aug 22 2016 — edited Aug 23 2016

I am a genealogist and manage my database in a Java application. When I want to print out a (large) family tree to pdf, I create a group of nodes, place them in a VBox and iterate

  • scroll group one page (group..setTranslateY(-scroll))
  • print page (job.printPage(printer, VBox))

That works fine for small trees. But for large trees it is sloooow. I did some profiling and noted that the time to render each page is proportional to the total number of nodes.

The processor spends 96% of its time in "usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE .............

So the algorithm scans through all the nodes for each page and only renders the nodes that fall in the print page window. Is there an alternative way to scroll, maybe using a masking operation, and would it be faster?

Post Details
Added on Aug 22 2016