<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi!<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">I'm afraid I don't understand the topic well enough, just a couple of thoughts that might help:<br><br></div><div class="gmail_quote">1) MD5 must always be calculated on the static data. I don't know how we ended up to calculate it on derived/interpreted data, but it really sounds as a bug.<br></div><div class="gmail_quote">2) Dirty bits. Sometimes it is quite difficult to ensure consistency of such bits. If we solve problem 1), can we avoid that?<br></div><div class="gmail_quote">3) For only-memory resources like Bg/Fg gradients it might be enough to generate a default name for them and save real color values (current colors). I guess that is exactly what the user expects to do.<br></div><div class="gmail_quote"><br><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""></span><div>So i think that for problem 3 we have three ways:</div><div><br></div><div>1) Either fix the classes to have only deterministic parts (but this might not be always possible given what the resource is and has to do) or calculate md5 on something that we are sure that it's not "interpreted" (but again this might no be fully possible if those parts doesn't change when the resource really change).</div><div><br></div><div>2) Implement a dirty bit in every resource and when creating bundles, if a resource that the user want to add to a bundle is modified, ask to the user which version of the two (original file, or the in memory modified version) he wants to add.</div><div>So if the resource is unmodified the original file will be copied into the resource bundle (right now is saved instead), if it's modified the user will choose and the file will be saved into the resource bundle only if the user chooses the modified version.</div><div>This way the md5 should be always calculated on the file, that is, afterall, the medium that can't change when given to others.</div><div><br></div><div>3) This is like solution 2 but without having to ask anything to the user. So for the case where the file is modified we automatically choose to use the modified version and to save it into the bundle.<br></div><div><br></div><div>2-3 Though do no solve the problem that arise when there's no original file, so when the resource is only in memory and it's representation can be different (when the resource is reloaded), from user to user. I think it's not solvable if not doing something like in point 1, or simply being sure to have files for everything.</div><div><br></div><div>What do you all think?</div></div></div></div>
<br>_______________________________________________<br>
Krita mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop" target="_blank">https://mail.kde.org/mailman/listinfo/kimageshop</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Dmitry Kazakov</div>
</div></div>