<div>Chris thanks for your answers. Yes, I was using the release 39. I´ve tested it with r40 (r40Gamma3) and it worked better.</div>
<div>I tested this with a bigger collection (84661 objects ) and it takes 16 seconds to answer either #size and #lastKnownSize. Do I have to set something to enable #lastKnownSize caching?</div>
<div> </div>
<div>The new results are:</div>
<div>
<div>
<div>"------------ 84661 objects - MagmaCollection>>size - fiirst evaluation"</div>
<div>[ (magmaSession root at: #ThesaurusTerm) size ] timeToRun "answer about 247 milliseconds"</div>
<div>"Note: magmaSession root at: #ThesaurusTerm answer a MagmaCollection"</div>
<div> </div>
<div>
<div>"second evaluation"</div>
<div>[ (magmaSession root at: #ThesaurusTerm) size ] timeToRun "answer about 0 milliseconds"</div>
<div> </div>
<div>"MagmaCollectionReader>>size first evaluation"</div>
<div>[ ((magmaSession root at: #ThesaurusTerm) read: #issnString) size ] timeToRun "answer about 16771 milliseconds"</div>
<div>
<div>"second evaluation"</div>
<div>[ ((magmaSession root at: #ThesaurusTerm) read: #issnString) size ] timeToRun "answer about 16870 milliseconds"</div>
<div> </div>
<div>
<div>"MagmaCollectionReader>>size first evaluation"</div>
<div>[ ((magmaSession root at: #ThesaurusTerm) read: #issnString) lastKnownSize] timeToRun "answer about 16573 milliseconds"</div>
<div>
<div>"second evaluation"</div>
<div>[ ((magmaSession root at: #ThesaurusTerm) read: #issnString) lastKnownSize] timeToRun "answer about 16529 milliseconds"</div></div></div>
<div> </div></div></div></div></div>
<div> </div>
<div>
<div>"------- 5500 objects - MagmaCollection>>size - fiirst evaluation"</div>
<div>[ (magmaSession root at: #Serial) size ] timeToRun "answer about 698 milliseconds"</div><span class="q">
<div>"Note: magmaSession root at: #Serial answer a MagmaCollection"</div>
<div> </div></span>
<div>
<div>"second evaluation"</div>
<div>[ (magmaSession root at: #Serial) size ] timeToRun "answer about 0 milliseconds"</div>
<div> </div>
<div>"MagmaCollectionReader>>size first evaluation"</div>
<div>[ ((magmaSession root at: #Serial) read: #issnString) size ] timeToRun "answer about 1246 milliseconds"</div>
<div>
<div>"second evaluation"</div>
<div>[ ((magmaSession root at: #Serial) read: #issnString) size ] timeToRun "answer about 1246 milliseconds"</div></div></div><span class="sg"><br>Juan M.</span></div>
<div><span class="e" id="q_114ccd938ed4cbb1_5">
<div> </div>
<div><span class="gmail_quote">On 8/31/07, <b class="gmail_sendername">Chris Muller</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>
> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Juan, please the section "Optimizing Performance" in the documentation<br>about querying MagmaCollections to understand when #size will be very
<br>fast vs. pretty slow.<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://wiki.squeak.org/squeak/5859" target="_blank">http://wiki.squeak.org/squeak/5859</a><br><br>For the cases that are "pretty slow" (
i.e., a Reader requiring<br>distinct results), note you have #lastKnownSize, which is the cached <br>size (therefore instant access).<br><br>- Chris<br></blockquote></div><br></span></div>