Wow, the thread has developed rapidly. Aweseome!
Even if, for professional reasons, I can no longer contribute so much this week, I would like to answer a few questions.
wilbert wrote:Is there a specific reason for using this reference based approach ?
No, not really. LOL
When I started developing the WinHandler module, I only envisioned that the gadgets could be anchored to the sides of the window. But over time I found it interesting if you could anchor the gadets to other gadgets as well. And so I started to write the code for that and to extend the internal WinHandler structure.
I honestly didn't even think about it, if there is an advantage compared to just anchoring the gadget to the window. But at least it saves typing, because the anchoring of a gadget is inherited to the reference gadgets this way.
wilbert wrote:can't you use group numbers and assign all of them the same group number instead of referencing each other?
I don't know if that would make it any easier. The gadgets in a group may need to be repositioned differently.
Reference gadgets can be anchored left, right, above or below a parent gadget. If the parent gadget changes in width or height, the gadgets that are anchored to the right or below must be repositioned. Gadgets that are anchored to the left or top of the parent gadget do not need to be repositioned in this case.
This is only an incomplete example, I can imagine that RefGadgets can also "inherit" height or width of the parent gadget.
yuki wrote:Ooh, if the sort field's value isn't strictly required to convey order (but instead used purely for accelerating sorting), we can squeeze more gains!
No, in my use case the sort field is not necessary for processing the gadgetlist. If the list for the gadgets is sorted correctly, the gadget names are simply read in order in a loop.
Btw: Great progress with V8()
wilbert wrote:Timings are so inconsistent on my computer.
I think the current form of comparing might not be accurate enough when you are counting microseconds.
I cannot confirm this on my approx. 7 year old computer either. Even with only a few items in the list, the results are very very similar in each run.
Wilbert, have you measured times with debugger disabled? I made this mistake in the beginning.
pjay wrote:Having said this, I do appreciate that some people just like a coding challenge, regardless of the practical purposes.
LOL, Yes as far as I'm concerned, that's exactly how it is. Sure, I needed the code for my project, but my ambition is also in other areas that I would like to optimize processes very much and strive to keep things simple and smart.
Which, by the way, does not exempt me from sometimes overlooking the simplest things and consequently programming complete nonsense.
wilbert wrote:That's it. It' just like a puzzle.
And for me I guess it might have to do with my age. A habit from back in the 80's with a Zilog Z80a cpu running at 3.5 Mhz.
yuki wrote:So much this! It's a nice brain-teaser, and seeing the performance numbers go up and up is always satisfying

Yes, that's exactly how it is for me too - Brothers in the spirit.

Me: 56 years old and started programming with a VIC-20 in the 80s.
wilbert wrote:V9; I couldn't resist

You guys are really crazy! And that's very sympathetic - LOL
I'm sorry that I currently can not write so much, but the Reallife.exe strikes again. I'll probably be able to get back to code next week.