[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Krita Colorspace and profiles
From:       Stefano Bonicatti <smjert () gmail ! com>
Date:       2016-03-27 20:17:24
Message-ID: CAGMAV48DDO8jXPg5abD04uj7hWLAP1M1hR4O9E3y6M=wy6s_2A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> Yes, that should be possible. For instance, there are buttons for adding
new profiles from disk during runtime.

Ok, that make sense, then there's an unwritten assumption that a new
profile won't be added at the same time as a colorspace get requested, or
that a colorspace that wanted to use that profile won't never be requested
before that profile is actually added to the list (it might sound silly to
think otherwise, why asking for something that you know that doesn't
exists, especially since the profile is added by a human, not by a result
of some side effect of some action. Still being sure of the exact
functionality that's requested from a certain class, and document it, it's
vital).

A last thing i noticed it's that the function always tries to search for
the colorspace using a profile name that might be an alias (if the profile
name is actually passed to the function), but there is no colorspace (as
far as i can see) that is stored using an alias profile name as it's key.
So lets say that the cache is empty and the first colorspace gets requested
with an alias profile name, the first thing is a cache miss.. after a cache
miss the alias and the original profile name will be used to search the
actual profile pointer in various places, but in the end what it will be
used as a part of the key, is the "original" profile name, not the alias..
So this is an optimization, but i really think that the first thing the
code should do is to "translate" the alias to the original profile name,
and only then try to hit the cache.

I will check this better and then show something on a differential.




2016-03-26 15:41 GMT+01:00 Boudewijn Rempt <boud@valdyas.org>:

> On Fri, 25 Mar 2016, Stefano Bonicatti wrote:
>
> > [...] it's not a mess because we're too stupid to do it right: it's
>> grown into a tangle because it contains years of bug fixes.
>>
>> I don't think you're stupid, i just think that when i see a tangle, i
>> want to disentagle that as a first thing, before anything else,
>> before stuff gets built on it that then needs to be changed as well,
>> complicating a lot more the task.
>> Those issues together with other are all very dangerous time bombs.
>>
>> That been said, i still didn't understand if it's correct that color
>> profiles can be created and added to the colorspace registry after
>> the startup or not (because this is happening now already).
>>
>
> Yes, that should be possible. For instance, there are buttons for adding
> new profiles from disk during runtime.
>
>
> --
> Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org
> _______________________________________________
> Krita mailing list
> kimageshop@kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>

[Attachment #5 (text/html)]

<div dir="ltr">&gt; Yes, that should be possible. For instance, there are buttons for \
adding new profiles from disk during runtime.<div><br></div>Ok, that make sense, then \
there&#39;s an unwritten assumption that a new profile won&#39;t be added at the same \
time as a colorspace get requested, or that a colorspace that wanted to use that \
profile won&#39;t never be requested before that profile is actually added to the \
list (it might sound silly to think otherwise, why asking for something that you know \
that doesn&#39;t exists, especially since the profile is added by a human, not by a \
result of some side effect of some action. Still being sure of the exact \
functionality that&#39;s requested from a certain class, and document it, it&#39;s \
vital).<div><br></div><div>A last thing i noticed it&#39;s that the function always \
tries to search for the colorspace using a profile name that might be an alias (if \
the profile name is actually passed to the function), but there is no colorspace (as \
far as i can see) that is stored using an alias profile name as it&#39;s \
key.</div><div>So lets say that the cache is empty and the first colorspace gets \
requested with an alias profile name, the first thing is a cache miss.. after a cache \
miss the alias and the original profile name will be used to search the actual \
profile pointer in various places, but in the end what it will be used as a part of \
the key, is the &quot;original&quot; profile name, not the alias..</div><div>So this \
is an optimization, but i really think that the first thing the code should do is to \
&quot;translate&quot; the alias to the original profile name, and only then try to \
hit the cache.</div><div><br></div><div>I will check this better and then show \
something on a differential.<br><div><div><div><br></div><div><br></div><div><br></div></div></div></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2016-03-26 15:41 GMT+01:00 Boudewijn \
Rempt <span dir="ltr">&lt;<a href="mailto:boud@valdyas.org" \
target="_blank">boud@valdyas.org</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span \
class="">On Fri, 25 Mar 2016, Stefano Bonicatti wrote:<br> <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> &gt; [...] it&#39;s not a mess because we&#39;re too stupid \
to do it right: it&#39;s grown into a tangle because it contains years of bug \
fixes.<br> <br>
I don&#39;t think you&#39;re stupid, i just think that when i see a tangle, i want to \
disentagle that as a first thing, before anything else,<br> before stuff gets built \
on it that then needs to be changed as well, complicating a lot more the task.<br> \
Those issues together with other are all very dangerous time bombs.<br> <br>
That been said, i still didn&#39;t understand if it&#39;s correct that color profiles \
can be created and added to the colorspace registry after<br> the startup or not \
(because this is happening now already).<br> </blockquote>
<br></span>
Yes, that should be possible. For instance, there are buttons for adding new profiles \
from disk during runtime.<div class="HOEnZb"><div class="h5"><br> <br>
-- <br>
Boudewijn Rempt | <a href="http://www.krita.org" rel="noreferrer" \
target="_blank">http://www.krita.org</a>, <a href="http://www.valdyas.org" \
rel="noreferrer" target="_blank">http://www.valdyas.org</a><br> \
_______________________________________________<br> Krita mailing list<br>
<a href="mailto:kimageshop@kde.org" target="_blank">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kimageshop</a><br> \
</div></div></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
Krita mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic