On 28.05.25 10:38, Will Godfrey wrote:
Finally, I notice this is slightly slower to startup.

On 29.05.25 17:42, ichthyo wrote:
Haven't noticed that, but I'll do a comparison with two release builds.

Drilled down with timings.

Culprit is Bank loading.

The infosearch function takes roughly the same time in both versions,
about 110µs. But it is called 1000 times in the new version, and not
at all in the old version.
So the new version needs about 150ms longer for boot-up.

On 29.05.25 21:17, Will Godfrey wrote:
The search is only supposed to be done if an instrument file doesn't have all
of ADD, SUB & PAD entries defined in the header.


FOUND IT!
This was something different, and /quite insidious/

In the Bank::loadFromConfigFile() I had written

if (XMLtree xmlInst = xmlBank.addElm("instrument_id", pos))


While obviously it should be "getElm"
So this adds a new entry, and binds xmlInst to it, but
because this new entry is empty, all settings fall back to default.
Notably also the "isUsed" setting.

Which causes the later checkbank() *not* to empty this slot,
and rather re-discover it from disk.


Oh Well...
I searched through the whole codebase, and I also found one
instance where I made a similar typo, but this time the other way round,
when writing (this one should actually fail).

All the other ~120 usages seem to be correct.


THANKS Will !! --
if you hadn't noticed a 100ms discrepancy,
this one might have slipped through maybe forever, who knows.


===========================================================
Probably the timing measurements are of general interest...
(now after applying the bugfix)
The first number is cumulative time,
the second number is time since previous measurement point
all numbers in milliseconds


### new version

□▷▶▷□ |2.0|2.0| ▷▷after Config-boot
□▷▶▷□ |354.3|352.3| ▷▷after Music-init
□▷▶▷□ |382.5|28.2| ▷▷after Bank-load
□▷▶▷□ |382.7|0.2| ▷▷after Engine-start
□▷▶▷□ |622.1|239.4| ▷▷after GUI-start

manually load some instrument....

□▷▶▷□ |2591.1|1969.0| ▷▷(tick)
□▷▶▷□ |2627.2|36.1| ▷▷after loadInstrument:/home/hiv/proj/Synth/Yoshimi.conf/bank/Ichthyo/0033-Gemshorn.xiz


### old version

□▷▶▷□ |2.3|2.3| ▷▷after Config-boot
□▷▶▷□ |344.5|342.3| ▷▷after Music-init
□▷▶▷□ |377.0|32.4| ▷▷after Bank-load
□▷▶▷□ |377.2|0.2| ▷▷after Engine-start
□▷▶▷□ |510.8|133.6| ▷▷after GUI-start

manually load some instrument....

□▷▶▷□ |2713.6|2202.8| ▷▷(tick)
□▷▶▷□ |2758.9|45.4| ▷▷after loadInstrument:/home/hiv/proj/Synth/Yoshimi.conf/bank/Ichthyo/0033-Gemshorn.xiz



_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to