Wednesday, 2015-10-28

*** artfwo has quit IRC00:05
*** edogawa has quit IRC00:19
*** artfwo has joined #lv201:42
*** artfwo has quit IRC02:38
*** edogawa has joined #lv207:27
*** falktx has joined #lv207:30
*** ricardocrudo has joined #lv207:39
*** falktx has quit IRC07:43
*** rncbc has quit IRC07:44
*** ricardocrudo has quit IRC07:56
*** sigma6 has joined #lv208:01
*** falktx has joined #lv208:33
*** edogawa has quit IRC09:04
falktxdrobilla: does lilv_world_load_resource load data even if the file has been loaded before?09:56
falktxmy code is running very slow even on my i7 machine09:56
falktxI mean, when scanning plugins that have 300+ presets09:57
falktxamsynth with ~2300 presets takes more than 20 secs09:57
falktxperhaps I can do an initial lilv_world_find_nodes without loading the resource, and only load the resource if that fails10:06
falktxaha, much better now10:07
falktxnow I don't call lilv_world_load_resource for amsynth and getting the preset info is instantaneous10:14
falktxand with noisemaker I only call lilv_world_load_resource twice for its 2 preset ttl files10:15
* falktx loves when things work fast10:20
*** ricardocrudo has joined #lv210:53
*** ricardocrudo has quit IRC11:07
*** son0p has quit IRC11:26
*** son0p has joined #lv212:08
*** artfwo has joined #lv212:32
drobilla falktx: It shouldn't, no12:33
falktxdrobilla: well, it seems to load them anyway12:34
falktxdrobilla: I think it happens when the presets are not in separate ttls12:34
falktxalthough for amsynth they do are in fact in separate ttl files...12:35
falktxah! amsynth includes the label inside the main manifest instead of the preset file12:35
drobillafalktx: It should happen at the file level.  It's in lilv_world_load_file() (world.c:830)12:35
falktxso my current code works without having to load the actual preset file12:35
falktxall I want is the label12:36
falktxthis seems to make things much faster12:36
drobilla20 seconds is beyond crazy though12:36
drobillasomething is weird12:36
falktxlot of allocations, it's 2300 presets after all12:36
falktxdivided into 18 separate files12:36
drobilla$ time lv2info http://code.google.com/p/amsynth/amsynth > /dev/null12:37
drobilla12:37
drobillareal0m1.871s12:37
falktxdrobilla: I forgot to tell you that was running on valgrind :P12:37
drobillalol12:37
drobillaYes, that makes a wee difference :P12:37
falktxrunning software in my pc in valgrind sorta matches the speed of the MOD :P12:38
drobillaheh12:38
falktxvalgrind is still slightly slower12:38
drobillaThere are a lot of .000000 in the preset files12:40
drobilla187K of useless 0's12:40
drobilla(Probably not significant, just the only thing obvious to shrink)12:41
drobillafalktx: Speaking of presets, what do you consider to be a preset for a graph/pedalboard?12:43
drobillafalktx: All the control values for everything inside?12:43
falktxsomething like that yes12:43
falktxthe connections and plugins loaded are the same, but the values for plugin controls will change12:44
drobillaOne option for this is that lilv could provide a streaming interface if you want to scan files for particular information but not keep them loaded13:07
*** NickSB2 has quit IRC13:18
*** ssj71 has joined #lv215:33
falktxdrobilla: I can't call lilv_world_load_all twice without getting duplicates. is this a bug or a feature?15:50
drobillafalktx: define "duplicates"16:05
falktxwell this:16:05
falktxlilv_world_add_plugin(): error: Duplicate plugin <http://moddevices.com/plugins/tap/autopan>16:05
falktxlilv_world_add_plugin(): error: ... found in file:///home/falktx/.lv2//tap-autopan.lv2/16:05
falktxlilv_world_add_plugin(): error: ... and      file:///home/falktx/.lv2//tap-autopan.lv2/16:05
falktxdrobilla: it doesn't always happen.16:06
drobillaIt is a feature to avoid actual duplicates16:06
drobillaIn this case, I don't know16:06
falktxI'll see if I can get a reproduceable case16:06
falktxseems just random16:07
drobillaThat's odd16:07
drobilla(The trouble with reloading that way is that no statements will be removed)16:07
falktxoh wait16:07
falktxperhaps it's not random...16:08
drobillaI assure you there is no if (rand() % 2) load_file() in there :)16:08
falktxah, it happens when I add a new bundle (in the filesystem, not via lilv api)16:09
drobillaBundle must contain a duplicate...16:10
falktxnope, I just copied the folder to .lv216:10
falktxand LV2_PATH is set to only .lv216:10
drobillaIt must know about the plugin somehow16:11
drobillaI'd guess you're explicitly loading the bundle as well?16:11
falktxactually no need to copy anything16:11
falktxcalling lilv_world_load_all twice is enough (I thought this wasn't the case)16:12
falktxif I call lilv_world_load_all() 2 times, I get the duplicates16:12
drobillaPresumably you will get a "duplicate" for every plugin found, yes16:12
falktxdrobilla: so, ahem, is this a bug or a feature?16:12
drobillamu16:12
drobillaIt's just not written for this16:13
drobillaand I don't think it can be, because to work correctly it would have to destroy plugins (and basically everything else)16:13
drobillaSome mechanism to explicitly do this and/or notify the host that things have gone away is required, as discussed earlier16:14
falktxperhaps a lilv_world_load_new_bundles ?16:14
drobillaIf you don't have a bunch of LilvFoo* pointers hanging around, it's certainly way easier to just nuke the world16:14
drobillaIf you do, then we'll need to do that16:14
drobillafalktx: Hm.  That seems reasonable16:15
drobillaand/or load_bundle itself could just skip the bundle if it's already loaded, like files16:15
falktxloading new bundles that appeared in the world sounds very useful16:15
falktxI know removing is tricky, so I'm not bothered with that16:15
drobillaAlso realtively easy and not burdened with the infinitely recursive hell of horrible problems that this shit usually brings up16:16
drobillalilv_world_load_bundle returns void16:16
drobillaSigh, I really need to get out of the habit of making anything in a API return void ever16:17
falktxdrobilla: btw, a question. if I do lilv_world_unload_bundle, replace the bundle with new contents, and then lilv_world_load_bundle. can that work?16:19
drobillaThe resulting model will be correct16:20
drobillaBut lilv has zero mechanism currently for removing objects like LilvPlugin*16:20
drobillaAt all.16:20
drobillaEver.16:20
drobillaAt all.  In any way.16:20
* drobilla never wants to have to say this again :)16:20
falktxkeeping the old pointers is a good thing16:21
falktxthey might be in use, so no complaints16:21
drobillaNot if they no longer exist it isn't16:21
drobillaWell, I guess some things might kind of work mostly sort of sometimes16:22
drobillaBut the plugin list itself might be wrong16:22
falktxmy question is rather if the plugin I ask for after load-bundle, if it's going to be the new contents, or the old contents16:22
drobillaI guess it could set the plugin as invalid and you're required to check that for everything if you ever do this16:22
drobillammm16:23
drobillait will drop everything in that bundle16:23
drobillabut the loaded files list might not be updated for all the seeAlsos.  I'm not sure16:24
drobillaI think, no.  Back to needing plugin removal16:25
drobillaIt would need to find all the files loaded from that bundle and unload them, or at least remove them from the loaded files list, since effectively the actual data is unloaded anyway16:27
drobillai.e. the thing at the end of lilv_world_add_plugin() but backwards16:27
drobillaexcept it needs to check that the file is actually within the bundle16:31
drobilla... and blissfully assume there are no cross-bundle seeAlso links16:31
drobillaWhich is probably totally unsafe16:31
drobillaMeaning a file refrence count is needed. Whee!16:31
drobillafalktx: I think it might actually be *no* contents16:37
drobillafalktx: That should be fixed16:37
falktxthis seems overly complex :(16:38
drobillaWell, yep.16:38
drobillaBut inherently so.16:38
falktxI'll just do a "killall mod-host" and let it auto-restart16:38
drobillaIt wouldn't be complex at all if it were just a model and none of this pretend to be a bunch of C objects shit was in there, but c'est la vie16:39
drobillaActually the above is not quite right, load_bundle does not load all the (e.g.) plugin data files16:40
drobillaBut getting anything from the plugin does16:40
drobillaThat seems excessive, but that'll surely work anyway16:42
drobillaThing is, if you have so much state around that reloading the worl entirely isn't feasible, there's a very good chance you don't want junk Plugin etc handles around either16:42
drobillaYou think you do right now, but it'll probably bite you in the ass a whole lot harder later16:43
falktxthat's why for my c lilv discovery code I only store 2 lilv pointers16:43
falktxthe world itself and the get_all_plugins return value16:43
drobillaSo why can't you just nuke it?16:44
falktxI can16:44
falktxthe issue is mod-host16:44
drobilla"my" is not mod-host above?16:44
falktxmod-host is a separate tool16:44
falktxI needed a fast way to get all data, a simple python ctypes thing with custom C lilv code is the best for this16:45
falktxpreviously I was using py-lilv, but even that was getting a bit slow16:46
drobillaOK16:46
drobillaWell, the only way I see of doing this is to add a callback to notify the app that some resource is now gone16:46
drobillaIf that thing is a plugin or pluginclass, the lists in the world are now junk16:47
drobillaI think those are the only things where that's an issue16:47
drobillaI will fix the unload reload thing, anyway16:51
drobillaThe rest, I don't know.  More API needed.  It was probably a mistake to keep the plugin list around in the world16:52
*** edogawa has joined #lv216:52
drobillaWhat do you plan to do if the plugin *is* loaded in a current pedalboard and it's removed, anyway?16:55
falktxwe are making a distinction between live usage and setup17:18
falktxduring setup (installing, removing) supposedly the audio won't  run17:18
falktxalthough I'd prefer if everything was dynamic17:20
*** sigma6 has quit IRC17:20
falktxI need to get this new code working first, almost there...17:20
*** rncbc has joined #lv217:30
*** uncle-j_j has joined #lv217:53
drobillaWell, I need to focus on Real Work™ right now, but I'll make unload_bundle unload any contained resources, and fire a callback to notify the host17:54
drobillaWhat to do in that case is the host's problem, but if you unload then re-load and the plugin is properly the same or a newer version, you'll get the new data and it'll be fine17:54
drobillaDon't know how painful wrapping a callback in Python via swig will be, there currently are none17:54
falktxthat will be awesome17:56
drobillaProbably needs a lilv_plugin_is_zombie() and lilv_world_drop_plugin() or some such on top of that17:59
drobillaBut this can be considered separately17:59
falktxdrobilla: btw this you're working on this. some of the lilv api comments say to use lilv_uri_to_path, but that's deprecated18:01
falktxthose should change to lilv_file_uri_parse18:01
falktx*btw since18:01
drobillaHm, k.  Thought I fixed that18:03
falktxoh you did, my files are still a bit behind18:10
falktx(asking, not stating)18:10
falktxdrobilla: I still see it in http://dev.drobilla.net/browser/trunk/lilv/lilv/lilv.h#L753 for example18:11
drobillaYes, some are still there, I just looked in mine18:11
*** son0p has quit IRC18:12
drobillaBloody escaping, PITA...18:12
*** son0p has joined #lv218:13
drobillaBleh, changes here, changes there... I seriously need to migrate to git already18:24
*** starsun has joined #lv220:01
*** starsun has left #lv220:06
*** ricardocrudo has joined #lv220:17
*** ricardocrudo has quit IRC20:28
*** edogawa has quit IRC20:53
*** edogawa has joined #lv220:58
*** edogawa has quit IRC21:05
*** edogawa has joined #lv221:08
*** falktx has quit IRC21:35
*** uncle-j_j1 has joined #lv221:50
*** uncle-j_j has quit IRC21:50
*** uncle-j_j1 has quit IRC21:59
*** falktx has joined #lv222:03
*** edogawa has quit IRC22:44
*** rncbc has quit IRC23:09
*** artfwo has quit IRC23:27
drobillafinally23:43
drobillaOne of the benefits of being a parallel computing researcher is that experiment times tend to be measured in the days so you can do other things in the mean time while still technically getting work done :)23:44

Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!