Long-running program getting bogged down RRS feed

  • Question

  • In my retirement I've gotten interested in node graphs.
    I have a long-running Java generation program that slows down almost three ordersof magnitude when the node count goes from 1k to 10k  nodes. 
    I used nanotime just before/after the generation loop and again at the beginning/end of each iteration.
    At 10k nodes the inside accumulated nanotime is a quite reasonable ~6ms and 10x that for 1k nodes. 
    However, the just before/after time jumps to about 6s. 
    I've tried Task Manager, Process Explorer, andVisualVM to try to figure out what's going on to no avail.
    CPU usage quiclly settles in to about 50% with idle at 49%.
    My best guess is that my long-running program is increasingly getting swapped out.
    Any suggestions on what to do/try?

    June 19, 2013: Here's some supporting test data that shows the sudden execution time increase.
    Nodes   Create   Save   Total
    PowTen     Sec   mSec     Sec
      0       0.0006     827      0.8
      1       0.0010     811      0.8
      2       0.0062     831      0.8
      3       0.0539     979      1.0
      4       0.3625   1712      2.1
      5     13.1422    2936    16.1
      6   666.7344  34113   700.9
    The creation loop's pretty tight because I used arrays instead of recursion.

    • Edited by MN John Wednesday, June 19, 2013 9:34 PM
    Wednesday, May 29, 2013 6:07 PM