GameOfLife / Unit-Lib

The Unit Library is a system that provides high level abstractions on top of the SuperCollider language.
25 stars 6 forks source link

If score window is bigger then certain ammount cpu usage of sclang goes to 100% #28

Closed miguel-negrao closed 10 years ago

miguel-negrao commented 10 years ago

if score window is bigger then certain ammount (in pixels) cpu usage of sclang goes to 100%. this is while the score is playing only tested on linux

woutersnoei commented 10 years ago

Can't reproduce on osx. Which size is it exactly? And does it happen for every score, or only fuller ones? I do notice that SCIDE takes about tree times more cpu to build the window than scapp. I suppose the Qt gui is not very well optimized..

miguel-negrao commented 10 years ago

Ok, it's not related with the window size, it's related with how fine is the subdivision of time in the score window. I think this subdivision is automatic, but on some scores with a certain duration, the number of vertical lines is huge, which causes the cpu spike. If you click on the image you can see the small lines. captura de ecra de 2013-10-14 14 47 44

Btw, does that mean you're now using the IDE for editing Unit Lib classes ? I ask because currently I have to remove all the automatic whitespace removals of the IDE before I commit anything to Unit Lib which is a p.i.t.a.... :-)

woutersnoei commented 10 years ago

Ah ok i see. Indeed on osx scapp also raises to 40% cpu on this one. I can reduce the number of lines, they are not very useful here anyway. I'll look into that. It would probably already help a lot if there are only half as many lines, right? This could also explain some slowness that other users reported.

Btw no I haven't moved to IDE yet. I still like cocoa gui too much :-). I do use it to test stuff though.

woutersnoei commented 10 years ago

in fact, I just made it happen :-). The minimum distance between the lines is now 4px (was 2px). When the distance becomes smaller, the lines become 10s lines instead of 1s. Then, if those also get less than 4px in between, they are hidden. It is still possible to have many lines, but you really need to make the window very big for that.

miguel-negrao commented 10 years ago

Great !