[Kde-pim] Review Request 119468: POC: Fetch tags with item

Dan Vrátil dvratil at redhat.com
Sat Jul 26 13:39:37 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119468/#review63193
-----------------------------------------------------------


> TAG "(\"gid1\" \"\" \"\" \"\" \"0\" () () \"-1\")") ))

I'm not very happy about this format. It's more error prone when it comes to extending/changing the format. Using the standard "KEYWORD value" pairs is IMO much better. It also allows skip empty parts.


server/src/handler/tagfetchhelper.cpp
<https://git.reviewboard.kde.org/r/119468/#comment43976>

    This breaks the attribute fetch when fetching multiple tags.
    
    The idea is that when fetching multiple tags, we fetch all their attributes in a single query (note that they are sorted by tag ID).
    
    Then, when we are iterating over the tags query results, we are iterating over attributes query results in nested loopo - and we iterate through attributes as long as the attribute belongs to the tag we are currently processing. The algorithm begins on l. 99 (before your change) and I'd like to keep it, as it's rather fast and works nicely.


- Dan Vrátil


On July 25, 2014, 5:48 p.m., Christian Mollekopf wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119468/
> -----------------------------------------------------------
> 
> (Updated July 25, 2014, 5:48 p.m.)
> 
> 
> Review request for Akonadi.
> 
> 
> Repository: akonadi
> 
> 
> Description
> -------
> 
> POC: Fetch tags with item
> 
> Works but is not cleaned up. Please tell me if it looks generally ok, or if you'd like to see some things done differently.
> 
> Example communication:
> 49: QDEBUG : TagTest::testFetchFullTagWithItem() qttest(1354)/libakonadi Akonadi::ItemFetchJob::doStart: "45  UID FETCH 2 EXTERNALPAYLOAD (UID CO
> LLECTIONID FLAGS SIZE REMOTEID REMOTEREVISION TAGS (UID) DATETIME)
> 49: "
> 
> 49: QDEBUG : TagTest::testFetchFullTagWithItem() qttest(1354)/libakonadi Akonadi::ItemFetchJob::doHandleResponse: "*" "2 FETCH (UID 2 REV 1 REMOT
> EID "" MIMETYPE "application/octet-stream" COLLECTIONID 5 SIZE 0 DATETIME "25-Jul-2014 15:46:53 +0000" FLAGS () TAGS ((UID 10 GID "gid1" PARENT 0
>  MIMETYPE "PLAIN" TAG "(\"gid1\" \"\" \"\" \"\" \"0\" () () \"-1\")") ))?
>  
>  The code is in the dev/itemtagfetch branch.
> 
> 
> Diffs
> -----
> 
>   server/src/handler/fetchscope.h 03fdf8ebff8bfa3c3f914fd7b79080b5758038a8 
>   server/src/handler/fetchscope.cpp a7ebb13205bdb40f724c6c7fdb6c0187de9ae3ba 
>   server/src/handler/tagfetchhelper.h 4c3f9078fc1be909c4c06faaeb9d662fa42885bd 
>   server/src/handler/tagfetchhelper.cpp e01e63920e2afe33a408b7826eb41beffeed368c 
>   server/src/handler/fetchhelper.h 49c51e8b4e813432e3dcdde9badbf196ec0c1a03 
>   server/src/handler/fetchhelper.cpp 079a8984aadbf166023736cd6c9ed55db3c6e9b7 
> 
> Diff: https://git.reviewboard.kde.org/r/119468/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Christian Mollekopf
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list