Filter performance

Which filter would perform better?

1. foo
2. bar

or

1. (foo|bar)

i think it’s highly unlikely you’ll notice any difference

actual processing time would probably depend more on regular expressions themselves i.e. regexp engine performance rather than tt-rss code (unless the expression is very simple like in your example)

I don’t know about performance but I discovered on my filters with 25+ expressions to match (not sure of the exact number) that the filters further down the list didn’t work at all. Using your #2 method and just putting them all on a couple of lines fixed the issue.

Interesting. The longest list I have has 21 rules. I will keep adding to it to see if it breaks.

Separate rules are easier to read and search than regular expressions but redundant. Either way, the regex filters are one of tt-rss’s best features.

The first thing I noticed is that when you click Test it will show an error right away and not scan articles. I thought maybe the filter was still working but it turned out it wasn’t (perhaps some were but there were a lot of articles coming through that shouldn’t have). When I removed enough rows to the point where clicking Test would scan through the feed and show results, the filters all started working again.

I can confirm: Test returns an error even with 21 rules. The filter seems to be working though.

filter test dialog is limited by maximum GET query string length (there’s a thread about it here somewhere, it’s 4096 bytes maybe, don’t remember), actual filter is not.

the way to test filters properly is using feed debugger.

Oh yes, thanks. I remember that Test dialog is not what many expect it to be.

this should now be fixed in trunk.

e: note that for the same reason its impossible to edit SUPER HUGE filter rules but honestly i think fixing this is not worth the trouble. if you’re dealing with like 25-paragraph long regular expressions you only have yourself to blame. nevermind

I now get a different error:

Unhandled exception. ReferenceError: query is not defined. Stack trace: getTestResults/</<@https://ttrss.redact.ed/js/CommonFilters.js?1582883154:230:11

vps • debian buster • php 7.3.11-1 • postgresql 11.7 • ttrss 340bb7f39

right, should be fixed by https://git.tt-rss.org/fox/tt-rss/commit/2fefb4fd8741b38f28831f2da9e359ab4f7fa8a6

Thanks. The error is gone but the original issue still persists: a big, 21-rule, filter, no results in the Test Filter window.

probably something else then. you can try adding a “.” as a catchall rule to see if it starts matching something.

e: upcoming new stuff

02lUPIJx