been playing with /apps/WDTVExt/js/plugin.js a liitle bit and here is code which greatly improves plugin search process:
- Code: Select all
Plugin.collectPlugins = function(path) {
traceln("searching plugins in " + path);
var pfile = new File("| /usr/bin/find " + path + " -iname *.plugin.js");
pfile.open();
var pplugins=pfile.readAll();
pfile.close();
delete pf;
if(pplugins) {
for (var inx=0;inx<pplugins.length;inx++) {
traceln("Plugin found: " + pplugins[inx]);
Plugin.pluginsPath.push(pplugins[inx]);
}
}
}
differencies in collect times:
original
- Code: Select all
End collecting plugins... took 120087ms
with code above
- Code: Select all
End collecting plugins... took 610ms
If there is a marketing department they would say something like "200x faster"
If this has been already resolved I appologize for spam.
Regards
T.




