[PD-dev] Double loading suceeded...

IOhannes m zmölnig zmoelnig at iem.at
Sun May 8 21:17:53 CEST 2016


On 05/08/2016 02:28 PM, Winfried Ritsch wrote:
>  tried /home/winfried/tmp/test_load/searchme.pd and succeeded
>  tried /home/winfried/tmp/test_load/searchme.pd and succeeded
> 
> Note the double suceeded lines.

this is known behaviour.
the first line is printed when the "searchme" object is found to be an
abstraction.
the second line is printed when the abstraction is loaded.

you will notice that for subsequent invocations of [searchme], you will
only get a single "succeeded" line (because Pd already nows that
"searchme" is an abstraction).
you will also notice that for  subsequent invocations of [searchme], you
will *not* see the "failed" lines for externals (e.g. searchme.pd_linux).

it might be a bit confusion, but i did not think it confusion enough to
spend coding energy on it - after all it is a double line of success
when everything goes right.

> 
> I also notices double suceeded on loading externals: like the 

i guess "externals" here refers to "libraries", since the [initbang]
object in question is really an abstraction.


> [acre/acre/initbang] from deken installed acre lib (last lines):
> 
>  [...]
> tried /home/winfried/pd-externals/acre/acre/initbang/initbang.l_ia64 and 
> failed
> tried /home/winfried/pd-externals/acre/acre/initbang/initbang.pd_linux and 
> failed
> tried /home/winfried/pd-externals/acre/acre/initbang.pd and succeeded

up to this line, Pd did not know that "initbang" was an abstraction. now
it does now it, and tries to instantiate it by loading the abstraction.

> tried /home/winfried/tmp/test_load/acre/acre/initbang.pd and failed
> tried /home/winfried/pd-externals/acre/acre/initbang.pd and succeeded

since loading the abstraction involves finding it on disk, Pd iterates
through the paths again. the two lines above demonstrate this.

> 
> see double succeeded line 
> 
> If this an unkown behaviour I can have a look in the s_loader.c
> 

what you are seeing is really just a side-effect of the new abstraction
loader, which now uses the same mechanics as other loaders (eg. the
external loader).

you might think it is inefficient to search two times for a single file.
however, in reality you get a performance boost as soon as you load an
abstraction multiple times.

e.g. when using [initbang] three times, the new loader will output:
tried ~/tmp/test_load/acre/initbang/initbang.l_ia64 and
failed
tried ~/tmp/test_load/acre/initbang/initbang.pd_linux and
failed
tried ~/pd-externals/acre/initbang/initbang.l_ia64 and
failed
tried ~/pd-externals/acre/initbang/initbang.pd_linux and
failed
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded

whereas the old loader would have done:
tried ~/tmp/test_load/acre/initbang/initbang.l_ia64 and
failed
tried ~/tmp/test_load/acre/initbang/initbang.pd_linux and
failed
tried ~/pd-externals/acre/initbang/initbang.l_ia64 and
failed
tried ~/pd-externals/acre/initbang/initbang.pd_linux and
failed
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded
tried ~/tmp/test_load/acre/initbang/initbang.l_ia64 and
failed
tried ~/tmp/test_load/acre/initbang/initbang.pd_linux and
failed
tried ~/pd-externals/acre/initbang/initbang.l_ia64 and
failed
tried ~/pd-externals/acre/initbang/initbang.pd_linux and
failed
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded
tried ~/tmp/test_load/acre/initbang/initbang.l_ia64 and
failed
tried ~/tmp/test_load/acre/initbang/initbang.pd_linux and
failed
tried ~/pd-externals/acre/initbang/initbang.l_ia64 and
failed
tried ~/pd-externals/acre/initbang/initbang.pd_linux and
failed
tried ~/tmp/test_load/acre/initbang.pd and failed
tried ~/pd-externals/acre/initbang.pd and succeeded


gfmsard
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20160508/a6aa5ff2/attachment.sig>


More information about the Pd-dev mailing list