[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Review Request 118231: Scheduler for the akonadi indexer.
From: "Christian Mollekopf" <chrigi_1 () fastmail ! fm>
Date: 2014-06-03 23:18:33
Message-ID: 20140603231833.16449.29881 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On May 22, 2014, 4 p.m., Vishesh Handa wrote:
> > src/pim/agent/scheduler.cpp, line 97
> > <https://git.reviewboard.kde.org/r/118231/diff/1/?file=273893#file273893line97>
> >
> > So each time an item is added, you pass the parent collection to the \
> > CollectionIndexingJob and there you fetch the entire collection (+statistics) and \
> > do a query on Xapian to check how many items are already indexed?
> > Arguably, the xapian query would be quite fast, but still.
>
> Christian Mollekopf wrote:
> That could be optimized as we only require up-to date statistics for a full sync, \
> but I really doubt that fetching a collection will have any noticeable performance \
> impact.
I decided against addressing this since it complicates matters and I don't think it \
will be an issue. Fetching a collection is very cheap, and if items arrive in batches \
the overhead becomes negligible.
- Christian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118231/#review58317
-----------------------------------------------------------
On June 3, 2014, 11:18 p.m., Christian Mollekopf wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118231/
> -----------------------------------------------------------
>
> (Updated June 3, 2014, 11:18 p.m.)
>
>
> Review request for Baloo and Vishesh Handa.
>
>
> Repository: baloo
>
>
> Description
> -------
>
> A scheduler for baloo:
> * delays the indexing until no new item has been added for at least 5 seconds to \
> avoid indexing during a collection sync.
> * remembers if it failed to index something and triggers recovery path on next \
> start.
> * supports manual triggering of recovery path if required.
>
>
> Diffs
> -----
>
> src/file/fileexcludefilters.cpp e1f2ed7f64353d098327e5eff44a5e5a17a48da2
> src/pim/agent/CMakeLists.txt e917915a3414738595caea5497859ef4810ec44c
> src/pim/agent/agent.h 1dbf0fc0a16d0615dbfa4878706359bb687facd0
> src/pim/agent/agent.cpp 8904d49d3579b58b634d2570fbcc8007e5ee41ed
> src/pim/agent/autotests/CMakeLists.txt 5ee987aad0d09c28da868ac8cd1c308f673bb7bf
> src/pim/agent/autotests/collectionindexingjobtest.cpp PRE-CREATION
> src/pim/agent/autotests/schedulertest.cpp PRE-CREATION
> src/pim/agent/autotests/unittestenv/config-mysql-db.xml PRE-CREATION
> src/pim/agent/autotests/unittestenv/config-sqlite-db.xml PRE-CREATION
> src/pim/agent/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc \
> PRE-CREATION src/pim/agent/autotests/unittestenv/kdehome/share/config/akonadi_knut_resource_0rc \
> PRE-CREATION src/pim/agent/autotests/unittestenv/kdehome/share/config/kdebugrc \
> PRE-CREATION src/pim/agent/autotests/unittestenv/kdehome/share/config/kdedrc \
> PRE-CREATION src/pim/agent/autotests/unittestenv/kdehome/testdata-res1.xml \
> PRE-CREATION src/pim/agent/autotests/unittestenv/xdgconfig/akonadi/akonadiserverrc \
> PRE-CREATION src/pim/agent/collectionindexingjob.h PRE-CREATION
> src/pim/agent/collectionindexingjob.cpp PRE-CREATION
> src/pim/agent/index.h PRE-CREATION
> src/pim/agent/index.cpp PRE-CREATION
> src/pim/agent/scheduler.h PRE-CREATION
> src/pim/agent/scheduler.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/118231/diff/
>
>
> Testing
> -------
>
> I'm running it for a while, and it reduced the stress that baloo imposed on my \
> system and all my mails are indexed since I'm using it (wasn't the case before).
>
> Thanks,
>
> Christian Mollekopf
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118231/">https://git.reviewboard.kde.org/r/118231/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On May 22nd, 2014, 4 p.m. UTC, <b>Vishesh \
Handa</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/118231/diff/1/?file=273893#file273893line97" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/pim/agent/scheduler.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">97</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">void</span> <span class="n">Scheduler</span><span class="o">::</span><span \
class="n">addItem</span><span class="p">(</span><span class="k">const</span> <span \
class="n">Akonadi</span><span class="o">::</span><span class="n">Item</span> <span \
class="o">&</span><span class="n">item</span><span class="p">)</span></pre></td> \
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So each time an item is \
added, you pass the parent collection to the CollectionIndexingJob and there you \
fetch the entire collection (+statistics) and do a query on Xapian to check how many \
items are already indexed?
Arguably, the xapian query would be quite fast, but still.</pre>
</blockquote>
<p>On May 22nd, 2014, 5:06 p.m. UTC, <b>Christian Mollekopf</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That could be optimized \
as we only require up-to date statistics for a full sync, but I really doubt that \
fetching a collection will have any noticeable performance impact. </pre> \
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I decided \
against addressing this since it complicates matters and I don't think it will be \
an issue. Fetching a collection is very cheap, and if items arrive in batches the \
overhead becomes negligible.</pre> <br />
<p>- Christian</p>
<br />
<p>On June 3rd, 2014, 11:18 p.m. UTC, Christian Mollekopf wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Baloo and Vishesh Handa.</div>
<div>By Christian Mollekopf.</div>
<p style="color: grey;"><i>Updated June 3, 2014, 11:18 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">A scheduler for baloo:
* delays the indexing until no new item has been added for at least 5 seconds to \
avoid indexing during a collection sync.
* remembers if it failed to index something and triggers recovery path on next start.
* supports manual triggering of recovery path if required.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I'm running it for a while, and it reduced the stress that baloo \
imposed on my system and all my mails are indexed since I'm using it (wasn't \
the case before).</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/file/fileexcludefilters.cpp <span style="color: \
grey">(e1f2ed7f64353d098327e5eff44a5e5a17a48da2)</span></li>
<li>src/pim/agent/CMakeLists.txt <span style="color: \
grey">(e917915a3414738595caea5497859ef4810ec44c)</span></li>
<li>src/pim/agent/agent.h <span style="color: \
grey">(1dbf0fc0a16d0615dbfa4878706359bb687facd0)</span></li>
<li>src/pim/agent/agent.cpp <span style="color: \
grey">(8904d49d3579b58b634d2570fbcc8007e5ee41ed)</span></li>
<li>src/pim/agent/autotests/CMakeLists.txt <span style="color: \
grey">(5ee987aad0d09c28da868ac8cd1c308f673bb7bf)</span></li>
<li>src/pim/agent/autotests/collectionindexingjobtest.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/schedulertest.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/config-mysql-db.xml <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/config-sqlite-db.xml <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/kdehome/share/config/akonadi-firstrunrc \
<span style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/kdehome/share/config/akonadi_knut_resource_0rc \
<span style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/kdehome/share/config/kdebugrc <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/kdehome/share/config/kdedrc <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/kdehome/testdata-res1.xml <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/autotests/unittestenv/xdgconfig/akonadi/akonadiserverrc <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/collectionindexingjob.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/collectionindexingjob.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/index.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/index.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/scheduler.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/pim/agent/scheduler.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118231/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic