Am Donnerstag, 15. Februar 2018 15:12:47 UTC+1 schrieb PMario:
>
> On Thursday, February 15, 2018 at 2:45:31 PM UTC+1, Jeremy Ruston wrote:
>>
>> Perhaps here we could say that the existing behaviour is equivalent to 
>> "each:tiddler", and the new behaviour is "each:value"
>>
>
> I would be OK with this suggestion. 
>
> Me as well. Please check https://github.com/Jermolene/TiddlyWiki5/pull/3124

Please check carefully as I included a bit of code vs. speed improvement (I 
hope)

Instead of checking for each tiddler which field we check, I do this once 
upfront.

so instead of (pseudocode)

foreach tiddler {
  if tiddler exists {
    is the field "title" use title as value else get the field as value
    push the value if it has not been seen before
}

I do

is the field "title" {
  foreach tiddler {
    if tiddler exists
      push the title if it has not been seen before
  }
} else {
  foreach tiddler
    if tiddler exists and the field value has not been seen before
      push the field value
  }
}

we save at least 5 [length of "title"] * (n [number of tiddlers] -1) 
compares in each use of "each".

 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ba52efc2-981a-4819-949e-653fef9e4a7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to