Archive

Archive for January, 2008

Speed up collapse and expand in JTree

January 18, 2008 Leave a comment

JTree is slow… Google this and you will find it is a well known problem. For one of my application I need to do collapse and expand operations on all nodes of a large JTree. Even with the large model flag set it’s take 20 seconds to expand the whole tree. Profiling the execution with Netbeans profiler we can see that 100% of the time is took be the UI. It seems to propagate changes to the UI after the expand/collapse of each nodes. So a way to speed up this is to remove the UI during the operation:

TreeUI ui = myJTree.getUI();
myJTree.setUI(null);
massExpand(myTreeRoot);
myJTree.setUI(ui);
Categories: Uncategorized Tags:

The wonder of #! (shebang)

January 4, 2008 Leave a comment

Adding this at the beginning of a python script will not work:

#!/usr/bin/env LD_LIBRARY_PATH=mypath python2.5

because shebang only interpret the first space. So it will be interpreted as:

#!/usr/bin/env LD_LIBRARY_PATH="mypath python2.5"

The script will call it self in an infinit loop.

Reference:

Categories: Uncategorized Tags: ,

Opencascade 6.2 Debian package

January 4, 2008 Leave a comment

The Opencascade license has been discussed on Debian mailling lists, here and here. One problem is that it’s built with Jonathan R. Shewchuk mesh (Triangle).

Opencascade need to be patched to build on Debian Sid. I wrote a post concerning this but Jason Kraftcheck made a much better work, providing patches which fix many problems.

It would be nice to have Debian package for Opencascade to easy install tools such as:

Categories: Debian Tags: ,
Follow

Get every new post delivered to your Inbox.