Forum Stats

  • 3,854,533 Users
  • 2,264,379 Discussions
  • 7,905,718 Comments

Discussions

how to speed up printing large tree

3300579
3300579 Member Posts: 3
edited Aug 23, 2016 3:49AM in JavaFX 2.0 and Later

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?

This discussion has been closed.