<br><br><div class="gmail_quote">On Tue, Apr 22, 2008 at 10:16 PM, Ryan P. Bitanga <<a href="mailto:ryan.bitanga@gmail.com">ryan.bitanga@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2008/4/21 Aaron J. Seigo <<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>>:<br>
<div class="Ih2E3d">> On Monday 21 April 2008, Jordi Polo wrote:<br>
</div><div class="Ih2E3d">> > - So, user priority list and blacklist is not working (nor whitelist : the<br>
> > only regression I am aware about). That depends on the configuration point<br>
> > above. The code to implement it is there though.<br>
><br>
> yes, this is a detail at this point =)<br>
<br>
</div>My code will fix this :) Wait for it. Btw, the idea about the<br>
whitelist was that if it wasn't set, all runners would be loaded,<br>
otherwise only the whitelisted runners would be loaded. This would<br>
render blacklisting unnecessary.<br>
<div class="Ih2E3d"></div></blockquote><div><br>In fact what I thought was 2 lists:<br><br>- priority list<br>- black list<br><br>As proposed by Aseigo, two constructors can be made, one of them with a kconfiggroup object. <br>
If the object is used, the application can have its own configuration and hence its own priority or black listing. <br>Else the application uses global priority set by the user. <br>Any runner not in the priority list just no user priority boost <br>
<br>I prefer black list over white list because:<br><br>- With a lot of runners (We all hope for this) it will be easier to explicit what you don't want and, ok, main reason is because is funnier destroy saying what you don't want and see how your not wanted results die :P<br>
<br>- When a new runner is installed by an third party app, it doesn't need to touch every configuration file's white list to add itself. It will not in the priority list, so no priority boost but at least will display its results with no extra configuration. <br>
<br><br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> * the copyrights in the file are wrong. you can't copy other people's code<br>
> from existing files and not carry the copyright over. so there are a few<br>
> copyrights missing there, probably Ryan's and mine for starters.<br>
<br>
</div>Er, I don't think I added a copyright line. But yeah, the copyrights<br>
should be in the runnermanager.* files. :)</blockquote><div><br>Yes, you are not either in interface or abstractrunner classes (where I stole the code from) . I've already added you.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
I like this portion:<br>
+int RunnerManager::launchQuery (const QString & term, const QString & runner)<br>
+{<br>
<br>
This would now enable us to selectively search. I think I pitched that<br>
idea last year. Either for Katapult or for KRunner. Can't quite<br>
remember which. But in any case I like the idea. :)<br>
<br>
You'll find that you can manage execution a lot easier by creating new<br>
threadweaver policies. My original policy limited executions based on<br>
runner; there was a maximum of 3 instances of a single runner. Then I<br>
changed it to a maximum of 3 slow runners when I realized it was still<br>
possible for two slow runners to starve all the other runners.<br>
<br>
IMHO we shouldn't be using heuristic algorithms for controlling the<br>
speed or priority lists for that matter. threadweaver has a priority<br>
queue of its own. Creating our own algorithms to work on top of that<br>
adds complexity, resulting in longer processing time. What we should<br>
change is the priority level of a job. threadweaver would then manage<br>
the execution itself.</blockquote><div><br>Threadweaver has a queue of jobs. AFAIK, if no dependences are given between the jobs are given, it will process the jobs in a FIFO fashion. <br>Thinking about it, it appears to me as a more difficult problem as it may seem. <br>
If runners is ordered and add them to the job queue as they appear in the list, . results of faster runners will appear first. Setting dependencies is tricky also, as we will have several concurrent threads but the user will likely provide a ordered list, comply with that and having concurrent processing is difficult ... Priority won't help when one runner is order of times slower than other ... <br>
<br>So, why not worry very little about runners (just have the list ordered and launch them in FIFO) and worry about ordering the results? <br><br>That's my ugly double foreach loop in the matches() method that orders only when the app request the matches. If the loop is ugly (aseigo already didn't like it) it can be change that to inserting the result in the correct position each time a match is added to the context. <br>
I wait for your comments before doing that. <br>Expect a remade patch later today. <br><br>As a side note, I guess I will pretty much cut much of my krunner development time in the short future. I applied to GSoC but failed. Meaning I should look for a job ASAP and living in Japan, a job means 10-14 hours/day 6days/week. No much free time left.<br>
<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Even my concept of tiers or levels for a runner hierarchy was based on<br>
simply modifying the priority levels and setting dependencies so that<br>
all execution management would be handled by threadweaver.<br>
<br>
But in any case, a RunnerManager class is way better than my initial<br>
plan of simply dumping all my thread management classes into some<br>
file.<br>
<br>
Anyway, I'll go over this again within a day or two. :)<br>
<br>
Nice work :)<br>
<br>
Cheers,<br>
<font color="#888888">Ryan<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Panel-devel mailing list<br>
<a href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/panel-devel" target="_blank">https://mail.kde.org/mailman/listinfo/panel-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jordi Polo Carres<br>NLP laboratory - NAIST<br><a href="http://www.bahasara.org">http://www.bahasara.org</a><br>