It is currently Tue Jun 23, 2026 11:49 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 1:49 pm  (#1) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
Gimp: 2.8.x
OS: Windows 32Bit


Hi All.

I tried to analyse, why gimp is so slow with LCMS turned on.
The problem seemed not gimp, but the slowlyness of LCMS.
To be sustainable, I changed gimp source from LCMS-1 to LCMS-2
The patch is not still accepted by the gimp development team.
But for solving the obvious problem, Michael Natterer would accept a clean patch
for chaching calls to the LCMS, but this exceeds my knowledge.
So I analysed gimp and lcms. I didn't know, how fast C-programs are. :oops:
In my desperation, I thought, it would be a good idea to reduce the size of
the render-buffer, just to give LCMS (and other display-filters) the chance to
render their heavy needs on smaller chunks.
And what shall I say: IT WORKS! :yes
I cannot provide a gimp-2.8.exe, because I changed a lot in my personel gimp,
that it would maybe not run on any other system.
What I did: I changed the value:

GIMP_DISPLAY_RENDER_BUF_WIDTH / ~HEIGHT

in app/display/gimpdisplayshell-render.h

from value 256 to value 64

Unfortunately, this means a recompile (in app, so only the .exe file is recompiled).

Could someone test it? For me it works like magic. Ok, ok, not magic, but with buffer 256,
the increase in speed is (just feeled, not measured) 10 times faster or more. The brush is absolutely
usable now. Strong breaking was the filter for the, I don't know the english word for the people,
that see wrong colors. I have activated:

color correction
soft proofing
filter for wrong color seeing people
gamma correction

And I can paint! Only if I move the brush very fast, there is a lag in move.
So please test it.

Hatti


Last edited by Onkel Hatti on Wed Jun 06, 2012 2:04 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 2:02 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12780
Hope you don't mind but I shared this link to the thread at bugzilla Hatti. :)

https://bugzilla.gnome.org/show_bug.cgi?id=675546

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 2:21 pm  (#3) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
Hi Lyle.

I actually just wanted the issue to be tested by peope who can compile (Partha, Rod, etc.)
but now it's too late...
Ok, let's see, what the developers say.
The increase in speed is really amazing. I mostly work with pictures of 18MPixel (5184x3456)
and with the display filters on, there was a lag even when I wanted to select a region.
There is no lag anymore.
I can paint with all display filters on, there is almost no more noticable lag.
But I don't know, what negative consequences this buffer reducing has.
Hatti


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 3:15 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12780
Sorry about that Hatti; should have PMed you first. I have no way of testing this since I can't compile, but Partha and samj can so hopefully they will try this and I may even uninstall 2.8 and install Partha's compile since he has been on top of things and the developers have yet to release 2.8.1 which is, imo, way overdue now. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 3:21 pm  (#5) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
I'm just compiling the freshest source from git for 2.8.1 :-)
Of course, with my patches...
I will see... In a few minutes. It takes long to compile gimp.


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Wed Jun 06, 2012 9:29 pm  (#6) 
Offline
GimpChat Member

Joined: Mar 14, 2011
Posts: 998
Onkel Hatti wrote:
I'm just compiling the freshest source from git for 2.8.1 :-)
Of course, with my patches...
I will see... In a few minutes. It takes long to compile gimp.

Onkel,

Can you send me the patch so that it doesn't get lost?

I modified the source as well to fix the size issue and so would be nice to incorporate your change.

Thanks,
Partha

PS: It will take some time since I am tied up all this week.


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 4:24 am  (#7) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
Here are all my patches.
Not much but worth a look...

lcms2.patch - patches files (incl. configure.ac) to lcms-2
file-tiff.patch - patches loading/saving tiff-files on windows
paintoptions.patch - patches files, so paintbrush is max 1000 pixels and the slider limited to 100
displayrender.patch - decreases display-buffer, removing lag-bug


Attachments:
gimp-2.8.1-patches.zip [5.98 KiB]
Downloaded 110 times
Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 4:28 am  (#8) 
Offline
GimpChat Member

Joined: Mar 14, 2011
Posts: 998
Thanks Onkel.


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 7:07 am  (#9) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16042
I will give it a go also.
And you are absolutely correct ...it takes a very long time to compile Gimp for me as i have only 1 core and 1 gig ram. :) ... as i have most c files patched ( language.c, and that sort of thing), and ready to go i usually do it overnight now.Most of the time i no longer need to babysit it. :lol
I will give it a go and let you know.

_________________
Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 8:01 am  (#10) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
Wow...
I have a 4 core with 8 GB, but for development, I use a virtual machine with 2 cores and 1,5 GB.
For the buffer-thing and the paintoptions it is not needed to compile whole gimp, just the app-directory.
A new gimp-2.8.exe is built.
The lcms2-thing changes the configure.ac, this means a complete recompile.
And the tiff part needs the recompiling of file-tiff-load.exe and file-tiff-save.exe


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 9:29 am  (#11) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16042
Onkel Hatti wrote:
Wow...
I have a 4 core with 8 GB, but for development, I use a virtual machine with 2 cores and 1,5 GB.
For the buffer-thing and the paintoptions it is not needed to compile whole gimp, just the app-directory.
A new gimp-2.8.exe is built.
The lcms2-thing changes the configure.ac, this means a complete recompile.
And the tiff part needs the recompiling of file-tiff-load.exe and file-tiff-save.exe


It probably will be easier to just patch everything and re compile the entire Gimp-2.8.1 package then. :)

_________________
Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Thu Jun 07, 2012 9:48 am  (#12) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
Yes. Maybe :)
In paintoptions.patch I patched the files that control the size of the brush.
It is up to 10000 pix maximum size, with the slider ranging up to 1000 pix.
Thats too much for me, I most often need brushes between 1 and 50, sometimes 70.
So I chenged brush behavior. It is now max 1000 pix and the slider up to 100, so I can get the
smaller brushes more easy with the mouse.
I made a bug out of it, but they told me, that brushes up to 10000 in size are really needed.
So it's just my personel flavour.
In 2.9.1, the slider seems to react logarithmic, so the patch is not needed there.


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 2:45 pm  (#13) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
My changes are already obsolete. The new GIT source announced a patch for the lcms problem.
It works (of course). I just compiled the newest GIT source.
The problems, that tiff files can't be loaded with windows, and the problem, that PDF files can't be
saved correctly, are also fixed.


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 2:55 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12780
Well they definitely should thank you Hatti; bet you they used your fix. Still all silent on the 2.8.1 front (so release the darn patch already; lol). I'm patient though. ;)

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 3:02 pm  (#15) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
No, they didn't use my fix. They made it a more complicated way.
I tried to reduce the amount of calculating each event fired, but they
made another calculation, that in the end calculates around the
buffer size to reduce it by situation.
Though I do not know side effects by reducing just the buffer size,
the method that the developers have choosen, was maybe a better
one...


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 3:08 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12780
At least they got it fixed (based on your experience; I'm still waiting; lol). I know they are probably trying to wait a month before releaseing the update; well it's been a month so do it already. lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 3:09 pm  (#17) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16042
I will wait for Parthas Portable build i think. :)

_________________
Image


Top
 Post subject: Re: Gimp slow with LCMS
PostPosted: Sat Jun 09, 2012 3:15 pm  (#18) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
With these fixes, the update is more than important, I think.
I do compile really often, because I play a lot with the source,
but the world is waiting for at least the lag bug fix.


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group