Donate Share

JTreeMap / KTreeMap

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

optimization suggesions

You are viewing a single message from this topic. View all messages.

  1. 2009-08-19 23:01:37 UTC
    I am trying to display a large set of data (i.e the whole contents of a disk) with JTreeMap.
    Right now it is impossible as the speed is so slow for the calculation. After hacking around the code I think the following optimization could be helpful and easy to implement.
    1. don't calculate if the area is too small, for example
    void calculatePositionsRec(...) {
    if (w0 * h0 < 20) return;
    2. don't calculate if the candidates are too many to display
    if (w0 * h0 < v.size())return;
    3. only re-calculate if necessary. i.e don't re-calculate for mouse move events, right click, etc.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.