JaneliaSciComp / Neuroptikon

Neuroptikon
Other
9 stars 3 forks source link

Improve interactive speed #63

Closed csweaver closed 9 years ago

csweaver commented 9 years ago

With a large script performing actions takes too long and is frustrating to the user

csweaver commented 9 years ago

The problem reported in this particular case is related to the problem on windows iss #73 where paths are rendered as cylinders instead of lines because of problems with OSG polytope interceptor.

cmbruns-hhmi commented 9 years ago

Is there any headroom to reduce the complexity of the cylinder models? I wonder if that might help improve the performance.

csweaver commented 9 years ago

That's a good idea, I'll try reducing the step size for cylinders when used for arborizatons.

csweaver commented 9 years ago

Reducing step size for cylinders confers no noticeable speed-up. Time to investigate new options.

csweaver commented 9 years ago

Despite my predictions, switching back to lines instead of cylinders doesn't seem to increase speed by much (I'm testing by clicking on regions since I cannot click on lines in windows).

I've identified the two slow portions of the code. Building the list of visibles to highlight takes a lot of time when selecting neurons, but no time when deselecting. Adding properties to 'visible' objects is also slow, but for no obvious reason.

csweaver commented 9 years ago

Kept a list of visited objects so that we don't loop through nearly as many. Saves about 1-2s on my machine. Not a major speed up, but there is not much fat to trim from the code.