30 March 2012

AC_PROG_RANLIB needed?

Several users reported problems running "./configure" and that only adding "AC_PROG_RANLIB" to configure.ac helped to solve the issue. The blog statistics show some searches on this too. It is not yet clear what causes this problem. Still adding "AC_PROG_RANLIB" shouldn't be neceesary as we have "LT_INIT" in configure.ac. And according to the libtool documentation
— Macro: LT_INIT (options)
— Macro: AC_PROG_LIBTOOL
— Macro: AM_PROG_LIBTOOL

   Add support for the --enable-shared, --disable-shared,
--enable-static, --disable-static, --with-pic, and --without-pic
configure flags.1 AC_PROG_LIBTOOL and AM_PROG_LIBTOOL are deprecated
names for older versions of this macro; autoupdate will upgrade your
configure.ac files.
Does anyone reading knows a solution to this problem?

28 March 2012

1.8.3 in Debian now

Yesterday 1.8.3 went into Debian Sid (unstable). Once it gets to stable this will solve the performance issue for a lot of users.

25 March 2012

Full Screen Support

As discussed a while ago I've now implemented a simple fullscreen toggle. As in many other applications a toogle menu action can now be found in the "Views" menu. This enhancement will be released with 1.9.3

Navigate Your History of Read Items

Today I found the time to implement a simple item history feature. Liferea now tracks the last 250 viewed items and using the new backward/forward buttons in the toolbar (or the corresponding menu items in the "Item" menu) you can navigate through this sessions previously read items.

This helps a lot when you use the "Unread" search folder and accidentily skip an item and forgot from which feed it came.

Note: To introduce the new buttons I had to change the stock icon of the "Next Unread Item" button. I decided to change it from the "forward" stock button to the "jump to" stock button which I believe to be a good match.

This feature is planned to be released with 1.9.3

23 March 2012

Using sqlite3 WAL Journaling

Morpheus suggested in a comment to check recent Mozilla sqlite changes for their places database. They basically switched to the new WAL journaling that is supported since sqlite 3.7. Therefore I performed some measurements on the update behaviour in WAL mode with different sqlite page sizes and "PRAGMA synchronous" settings.

The Results:

FS Journal Mode Page Size Sync Mode Update Duration
ext4 none 1k (default) FULL 59s
ext4 WAL 1k FULL 6,3s
ext4 WAL 4k FULL 6,2s
ext4 WAL 8k FULL 5,9s
ext4 WAL 16k FULL 5,8s
ext4 WAL 32k FULL 6,7s
ext3 WAL 32k FULL 1s
ext4 WAL 32k NORMAL 0,9s

According to the sqlite documentation WAL journaling is expected to have a significantly better write-throughput compared to synchronous mode without journaling. The results above confirm this.

When using "PRAGMA synchronous=FULL" the execution time improves to 1/10 of the original 60s. With WAL journaling the sqlite documentation recommends to use only "PRAGMA synchronous=NORMAL". By doing so we loose the durability guarantee from the ACID criterias, but 1/60 of the original execution time might be worth it. The sqlite documentation says

 "There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database in NORMAL mode."

Additionally the page size is said to have an influence on the performance. This isn't the case for Liferea, but to be on the safe side it doesn't hurt increase from the default setting of 1k to 32k which should cost only a bit more memory.

Disadvantages:

  • As already mentioned the chance of data loss will increase...
  • Also sqlite3s WAL journal is not supported on network filesystems!

Fazit:

We have to try to switch to WAL mode.There is no guarantee that it will be safe without long term tests, but the immediate performance gain is critical.

I'll create two releases 1.8.3 and 1.9.2 soon and hope you give a lot of feedback! It would be most helpful if you can include the number of feeds, your cache size setting and DB file size.

60x Performance Decrease

For everyone wondering about the bad performance when using Liferea on ext4 this is how it looks:

Version Avg Startup Avg Full Update
1.6.7 (ext3) 2,3s 15,8s
1.8.0 (ext3) 2,6s
(VACUUM on startup)
1s
(introduced asyncsqlite)
1.9.1 (ext3) 2,1s
(VACUUM now on demand)
1,1s
1.9.1 (ext4 defaults) 2,2s 59,1s
1.9.1 (ext4 no barriers) 2,1s 1,2s

Test Notes:
  • All tests were performed on the same host with Debian Wheezy the same feed list (and same cache directory for each cache version) and a "echo 3 >; /proc/sys/vm/drop_caches" to get a cold disk. 
  • DB Size was roughly 10MB with 80 feeds and cache size 100
  • The "Avg Startup" column corresponds to the "liferea_shell_create" measurement you get with "liferea --debug-perf". The "Avg Full Update" column is the sum of the costs of all update callbacks as reported by the "feed_process_update_result" callback.

As you can see we have a 60-times decrease in performance with the same code! This causes the GUI to freeze during updates and surely makes Liferea unusable.

Dark Welcome Screen

1.9.1 fixes the welcome screen for dark themes which had a fixed background colour until now. Still I found no solution for the help pages (which are fixed black on white) as we load them as static files into Webkit with no chance to apply dynamically generated CSS...

What could be the best way to hook dynamic CSS into Webkit? I found no WebkitView properties for setting font and background color which would also be a solution and I want to avoid implementing an internal callback just to load dynamic CSS...


18 March 2012

1.8.2: VACUUM only when needed...

I believe a lot of our users will like this release. The startup behaviour until now was to perform a costly database VACUUM on each start. Starting with this release the VACUUM is only performed when a certain fragmentation ratio is reached.

Be lazy with cleaning!


This behaviour was suggested by adriatic in the discussion of a blog post concerning Lifereas performance by Jeff Fortin.

I hope this will easy the pain of the heavy users since most distros moved to ext4. Please give feedback wether this did help you or not!!!