<div class="gmail_quote">On Thu, Jul 8, 2010 at 5:25 PM, Piotr Galiszewski <span dir="ltr">&lt;<a href="mailto:piotr@galiszewski.pl">piotr@galiszewski.pl</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Great ;) . I have already learned a lot and I know that every<br>
experiences are important. I was only little nervous about gsoc<br>
timelines, cause I am far behind my original schedule :/<br></blockquote><div><br></div><div>  Well, from my (selfish) point of view, I&#39;d rather have you focus on</div><div>quality over quantity.  That&#39;s because if you write good code, even</div>
<div>a small amount, I can use it.  If you churn out a ton of code that&#39;s</div><div>not up to snuff, it&#39;ll probably just end up being dropped and the</div><div>whole exercise will be a waste of time for both of us.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt;   Is package_manager some sort of a global storage pool of Packages,</div><div class="im">
&gt; then?  Could you maybe call it package_pool instead to avoid naming<br>
&gt; confusion?<br>
<br>
</div>yes it is. I will call it that<br>
<div class="im"><br>
&gt;   I don&#39;t really understand the whole purpose of the Package object.<br>
&gt; Is the goal here to save memory and CPU time by only copying package<br>
&gt; information into QStrings once per package?<br>
&gt;<br>
<br>
</div>For model I need an array of packages. And as the number of packages<br>
is really big I have decided that custom class with lazy loading could<br>
be a good idea. And my tests show that it is true (especially in case<br>
of showing description on the list)</blockquote><div><br></div><div>  The other frontends don&#39;t have to do this, or perhaps they just are</div><div>slow and could benefit from your work here!  Either way, I&#39;d like to dig into</div>
<div>this a little more.</div><div><br></div><div>  These are the ways of retrieving package information from a package</div><div>that spring to mind immediately:</div><div><br></div><div>  1) Fully eager: as soon as the Package is created, copy all the values from</div>
<div>      the PkgIterator over into the Package object (I believe the GTK+ code</div><div>      effectively does this).</div><div>  2) Fully lazy: the first time a member of Package is accessed, copy all the</div><div>      values from the PkgIterator into it (what the current Qt code does).</div>
<div>  3) Memberwise lazy without caching: just store a PkgIterator; when a</div><div>      component of the Package is requested, return the corresponding</div><div>      member of the PkgIterator (what the curses frontend does).</div>
<div>  4) Memberwise lazy with caching: when a component of the Package is</div><div>      requested, copy the corresponding member of the PkgIterator into the</div><div>      Package object and return it (I don&#39;t think any aptitude code does this).</div>
<div><br></div><div>  Which of these did you try?  Do you have numbers showing how big an</div><div>improvement you saw?  Could you try some of the others to compare?</div><div><br></div><div>  Is there any way to lose the QFoo types in Package?  I&#39;m not sure we</div>
<div>want to reuse it directly, but there might be a way to solve this problem</div><div>more generally, as long as it doesn&#39;t require the use of Qt-specific (or</div><div>GTK-specific) types.</div><div><br></div><div>
  Daniel</div></div>