LuxGUI kills render performance

Discussion related to the development & design of the LuxRender Graphical User Interface
coordinator: none (position is open)

Moderator: coordinators

LuxGUI kills render performance

Postby abstrax » Thu Sep 11, 2008 4:42 am

Hi everybody,

I have a request for a change:

I was wondering for a while, why the heck is the rendering in the version from 12/8/08 or from CVS is getting slower (== less samples/s), when I increase the picture size. A simple test scene showing ~34000 samples/s at 320x240 pixels slows down with every increase and comes to complete halt at 800x600 pixels with only 16 samples/s. I'm rendering on a 1.3GHz Centrino laptop with onboard graphic. The interesting thing was, that the problem didn't occur in version 0.5...

After a while I recognised that, when I paused Lux, the application was still using 30% CPU time, even though it wasn't doing anything. So I turned on the debugger and saw, that the LuxGLViewer::OnPaint() was called all the time. The reason is, that LuxGLViewer::OnTimer() is refreshing the display every timer interrupt (~18x per second). And this was killing the render performance, as OnPaint() was drawing the complete viewport and that quite slow on my notebook.

After removing the OnTimer() callback, there was no slow down anymore.

-> Please remove the marching ants. They are not really necessary and on computer like mine, they cause a lot of trouble.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxGUI kills render performance

Postby Radiance » Thu Sep 11, 2008 7:12 am

the weird thing is that everything works ok here, and i'm on win32 too...
can you mail me a rar file or something with your compiled win32 binary so i can replicate it ?

Radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: LuxGUI kills render performance

Postby abstrax » Thu Sep 11, 2008 8:03 am

Hi Radiance,

Just use the build from here: viewtopic.php?f=30&t=952#p8080

I guess, the reason why it's not a problem on your system is, because it's damn fast compared to my notebook (and has several cores). As far as I know the biggest part of the OpenGL implementation of Intel chipset graphics is done in software. So my notebook is a good system to check, if the GUI is efficient or not. And at the moment it's not ;) Well, actually it's efficient, if it wouldn't redraw the whole window 10x a second (the 18x per second refresh rate in my previous post was wrong)!

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxGUI kills render performance

Postby Ratow » Thu Sep 11, 2008 5:29 pm

Hey Marcus,

You're probably right. Currently the GUI blindly refreshes the screen at 10fps with or without the marching ants selection. Also, as commented in the code, the painting done during these refreshes should be only over the selection and not the entire screen, which further slows things down...
Before scrapping out the marching ants, we should at least try to optimize it. ;) Unfortunately I've been very busy with work and some other problems and thus I have been unable to contribute to lux lately... :(
If anyone wants to optimize this (you, perhaps? :D), I would surely try to help. :D

-Ratow
User avatar
Ratow
Developer
 
Posts: 308
Joined: Sun Oct 28, 2007 8:19 am
Location: São Paulo, SP, Brazil

Re: LuxGUI kills render performance

Postby abstrax » Thu Sep 11, 2008 5:44 pm

Ratow wrote:Hey Marcus,

You're probably right. Currently the GUI blindly refreshes the screen at 10fps with or without the marching ants selection. Also, as commented in the code, the painting done during these refreshes should be only over the selection and not the entire screen, which further slows things down...
Before scrapping out the marching ants, we should at least try to optimize it. ;) Unfortunately I've been very busy with work and some other problems and thus I have been unable to contribute to lux lately... :(
If anyone wants to optimize this (you, perhaps? :D), I would surely try to help. :D

-Ratow


Hi Ratow,

I can try it tonight. I guess, I will try to just redraw a black/white rotating frame without redrawing all the rest, but we will see.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxGUI kills render performance

Postby abstrax » Fri Sep 12, 2008 8:45 am

Ok, I have modified the selection stuff in LuxGUI. They include the following changes:
- The selection and the highlight selection are now both static wxViewerSelection objects.
- I extended the wxViewerSelection class a bit, to make the code a little bit cleaner.
- The canvas is now only refreshed (at 8 fps) if a selection or a highlight selection frame is in the viewport.
- As long as the image content doesn't change, only the marching ant rectangle gets refreshed, nothing else.

These changes allow me to render full speed, if no selection or highlight selection frame is drawn and only with a penalty of 1% if a marching ant frame is drawn.

Can I check the changes in? (I've got a CVS account).

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxGUI kills render performance

Postby abstrax » Fri Sep 12, 2008 5:37 pm

As no one answered: Here is the patch for the changes I would like to commit:
seletion_patch.zip
(4.01 KiB) Downloaded 32 times

If someone wants to review the changes, please have a look, as I'm not sure if I've done the double-buffer stuff correctly. At least it works on my machine...
When you think it's allright, I will commit the changes.

Thanks,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: LuxGUI kills render performance

Postby Ratow » Fri Sep 12, 2008 6:13 pm

Hey, nice job!

I did a quick review of the patch and there's nothing I want to add so, please, do commit. :)

-Ratow
User avatar
Ratow
Developer
 
Posts: 308
Joined: Sun Oct 28, 2007 8:19 am
Location: São Paulo, SP, Brazil

Re: LuxGUI kills render performance

Postby abstrax » Sat Sep 13, 2008 12:34 am

Hi Ratow,

Thanks for checking :) The patch is in now.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand


Return to LuxGUI

Who is online

Users browsing this forum: No registered users and 0 guests