D23787: [baloo_file_extractor] Improve handling of large plain-text files

Stefan BrĂ¼ns noreply at phabricator.kde.org
Thu Sep 26 01:21:06 BST 2019


bruns requested changes to this revision.
bruns added a comment.
This revision now requires changes to proceed.


  Can you please provide an example which:
  
  - is currently indexed though it should be skipped due to size
  - is skipped after this change
  
  and another example which:
  
  - is currently skipped though it should be indexed
  - is indexed after this change

INLINE COMMENTS

> app.cpp:184
> +        // have trouble processing them
> +        if ((ex->extractorProperties()["Name"].toString() == QLatin1String("PlaintextExtractor")) && (filesize >= 10 * 1024 * 1024)) {
> +            qCWarning(BALOO) << "Skipping" << url << ": large plain text file";

You should compare for size first, as that's much cheaper than fetching the property and comparing  the string.

> app.cpp:185
> +        if ((ex->extractorProperties()["Name"].toString() == QLatin1String("PlaintextExtractor")) && (filesize >= 10 * 1024 * 1024)) {
> +            qCWarning(BALOO) << "Skipping" << url << ": large plain text file";
> +            continue;

Users will love us for spammig the logs ...

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D23787

To: poboiko, #baloo, bruns, ngraham
Cc: broulik, kde-frameworks-devel, #baloo, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190926/ff6a9138/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list