#229 load abstractions using sys_loader

puredata (385)

in the current implementation "external" objects are loaded using a "sys_loader" mechanism, whereas "abstractions" are handled in a special way.

the attached patch tries to remove this special handling by using the "sys_loader" mechanism for abstractions as well.

WHY: there are several reasons for why i want this patch:

- unification of object loading (why would we want to handle abstractions and "externals" separately?)

- loading speed (currently when try to create an abstraction [foo], Pd will start searching all of its paths for foo.l_i386 and foo.pd_linux, then it will call all other loaders to try to open "foo" and finally it will search the all paths for "foo.pd"; if i use the abstraction multiple times, i will repeat all(!) of the above steps;
when using the loader-mechanism this can be improved as we already know that a certain object is implemented as an abstraction; therefore there is no need to try to load the object via (e.g.) a dll-loader or the lua-loader.
esp. when running with "-verbose", i have encountered a speedup from 37.941seconds to 14.350seconds when openeing a largish patch (without "-verbose" the speedup should be smaller though)

- (external) hexloader likes to call sys_load_lib() recursively with mangled names; with this patch hexloader (and other advanced stuff) will be working with abstractions as well

COMPATIBILITY ISSUES: currently i cannot think of any; the abstraction load is still called after all other loaders; abstractions are still read from file as they are instantiated

NOTE: this patch requires patch-#1990599 to be applied beforehand http://sourceforge.net/tracker/index.php?func=detail&aid=1990599&group_id=55736&atid=478072


  • IOhannes m zmölnig

    patch against todays SVN (requires also #1990599)

  • IOhannes m zmölnig

    • status: open --> closed-invalid
  • IOhannes m zmölnig

    Logged In: YES
    Originator: YES

    actually it doesn't do everything promised; i will try to fix it an reopen



Cancel  Add attachments