<br>I open a new thread as I want to address only this specific topic here.<br>I thought that a complex type (ontology) for the information we are dealing with will be beneficial, but well, Aseigo convince me in the IRC last night that it will not. <br>
<br>If the complex system is not used, I want to throw a couple of thoughts. <br><br>- If we stick to our current types ( 7 ) or we add a few more in the near future, we still can get benefits from letting runners inform the manager what types they are interested in. Mainly, we don&#39;t need to launch all the runners but only those that apply to the type of the information. This saves as reading all the list of runners adding all of then to the queue of jobs, start a job, make a check to see if the runner apply, exit runner, close job. I expect ThreadWeaver be fast and able to manage lot of small tasks but when we have 100 runners, and only 15 will apply, not launching 85 of them seems the best solution. <br>
Also runners will know that the information they get is the type they wanted to avoiding a basic check. And no strange actions will correspond to some information when the runner writer wasn&#39;t careful (no spellchecking in directories for instance).&nbsp; <br>
So we can create a hash of list of runners or something similar when we load them and just use the correct list (load once, use a lot). <br>Of course one runner can be in more than one list what make us have some extra pointer to runner around what I think is a negligible extra use of memory. <br>
<br>- Aaron argued that complex types like &quot;bookmark from konsole&quot; will be specific enough for only one runner be in charge of both find it and exec it so no need to make the type available to other runners. If something else should apply to that type in particular, that should go to that runner (for instance &quot;launch with yakuake&quot; action). <br>
I see that and it looks like a better approach than mine. <br><br>Now an example, in a desktop we got these kinds of information:<br>Bookmarks from konqueror<br>Bookmarks from konsole<br>Bookmarks from krdc <br><br>We want to search for all these 3 and launch the corresponding application. How to do it?<br>
<br>a.- 3 runners each of them looks for its domain specific info and make its domain specific action. Sounds good but the bulk of the code of these runners will be the code that opens and looks for the &quot;term&quot; in the bookmarks, so we have 80%code copied between them.<br>
<br>b.- 1 runner for bookmarks. Currently I have that coded. Use data of the SearchMatch as a QStringList and store the KUrl and the name of the application it comes from. Exec according to that. <br clear="all"><br>&quot;b&quot; looks better than &quot;a&quot; IMHO (I am allergic to copying code) but what will happen when external application KThisApplicationRocks wants to create a similar runner for its bookmarks, 80% of code copied?<br>
<br>Create a librunner with common utilities?<br><br>-- <br>Jordi Polo Carres<br>NLP laboratory - NAIST<br><a href="http://www.bahasara.org">http://www.bahasara.org</a><br>