This commit makes three modifications:
* Introduces some sleep() calls in AccountSynchronizer and
EmailPrefetcher to avoid thrashing hard when under load
* Modifies the AccountSynchronizer not to go back so far before
giving up and to traverse time by three months instead of one
to locate a folder's epoch email quicker
* If the max epoch time is reached, just pull in all emails, as
the server search is apparently not working
This causes us to generate localized help docs whenever Geary builds,
and then the localized docs are installed with the rest of the help
pages.
It would be great to also have the CMakeLists read from the Makefile.am
file to determine what translations to run, but that hasn't happened
yet.
Closes: bgo #713831
The code for distinguishing between a new database and an existing
one being upgraded was faulty, causing the progress monitor to be
started/stopped when it should've have been.
"sidebar-name-changed" signal was not disconnected when dropping
a Sidebar.Entry from the Tree, meaning that if the Entry was still
ref'd and its name changed, the Tree was attempting to update an
Entry it did not hold.
Writing the window_{width,height,maximized} variables triggers
a dconf database update. This is an expensive operation as
dconf writes down a full copy of the database and renames
over the old one. dconf does not check for unchanged values.
configure_event() is called for every pixel of a window move,
and writes the window_* variables - those do not change during
a move. Check by running
"dconf watch /org/yorba/geary/" and moving the window or just
listen to the hard disk grinding.
This patch checks if the values have changed before writing
them out, which fixes the issue and provides a
disk-grinding-free window move experience.
Closes: bgo #724953
1) Use docid instead of id in search table.
We had previously included an 'id INTEGER PRIMARY KEY' column in the
MessageSearchTable, assuming it would get the same rowid alias treatment
as it does in non-FTS tables. That assumption was wrong: it was being
created as a FTS column. This fixes it so we use docid everywhere.
To fix the old incorrect docid values, we simply blow away the search
table and let the natural search table population process, which now has
the correct docid insertion code, fix the problem.
This also removes the id column from the search table creation SQL, but
this will only affect new users. Upgraders will see an empty, vestigal
id column in their search table. Since SQLite doesn't easily let you
remove columns, it's just easier to ignore the column than go through
all the work to fix it.
2) Do as many rowid lookups as possible in batches, instead of doing
them individually in loops. This speeds up working with large sets of
email.
3) Rejigger indices on the MessageLocationTable to make certain queries
faster. This creates a new covering index in particular for the email
prefetcher, which previously had to sort using a temp table. The new
index should work in the general case too, as we should never be looking
at ordering without folder_id (and since folder_id comes first, it works
as an index on just folder_id, too).
4) For bonus measure, log all slow queries (> 1s execution time) to
debug output.
Closes: bgo #725929
We're seeing a bug where under certain conditions like a flaky internet
connection, Geary will decide you don't have any remote folders and
simply remove them all locally. What's probably happening is we're
getting an error and ignoring it. Since we don't know what the true
error is, this patch simply adds some logging for that case and sets a
flag so we don't run the delete folders logic if there was an error.
Once we get a handle on what's really going on, we can implement a more
surgical fix.
Closes: bgo #726049
Mark read/unstar always operate on all messages in the selected
conversations. Mark unread/star now work the same way everywhere: it'll
mark each selected conversation's latest message in the current folder,
falling back to the latest message period for folders like the search
folder where nothing really lives.
The individual mail operations available in the conversation viewer are
unaffected, as they always just operate on the one message.
Closes: bgo #714008
This ensures we can't, say, overwrite someone's .bashrc file by sending
them an email. It also fixes errors where Geary couldn't handle
attachment filenames that contained slashes.
Closes: bgo #714549
This introduces the possibility of reentrancy, which was guarded against
before. It seems harmless, though. Regardless, we'll keep our eyes
peeled for any issues related to it.
Closes: bgo #720712
webkit_context_menu_item_get_action() fails an assertion when fed the
item indicating that there are no spelling suggestions. Since this item
is insensitive, we avoid making the call in that case. There are no
other insensitive items we need to do something special with.
Closes: bgo #725518
Turns out for long-running upgrades we were running them all in
parallel, which thrashes the disk pretty hard. This adds a simple mutex
lock around each upgrade, so at least the computer is usable while it's
going on. A more robust solution would be to have a single-thread
thread pool where we enqueue upgrades, but that's too much change this
late in the release cycle.
Also it turns out that the nullifying of the internaldate_time_t column
before we repopulate it was very costly, and unnecessary. So, this also
should speed things up for upgrading users.
Closes: bgo #724475
We know we've got some accounting problems in our unread counts. This
patches over the most egregious errors by fetching the real count from
the server more frequently. It also more frequently triggers the full
email synchronization process.
Closes: bgo #714865
Looks like when we went to the pill toolbar, we lost our plural tooltips
on the toolbar. This hooks up to the tooltip changed signal to keep the
buttons in line with the action, which we're setting from the
controller.
Closes: bgo #720710
This adds a progress monitor to the folder open operation. The spinner
in the status bar is hooked up to it only for the currently selected
folder, so that background updates don't trigger the spinner.
Closes: bgo #713703
The internal Imap.Folder object was not being closed in all code
paths, causing the re-open to fail every time. Solution is to
properly close the object and to distinguish between soft and hard
failures when opening a connection to the server.
ReplayRemoval must be processed in-order with ReplayAppend operations.
By making it local-only, removals could execute before previous append
notifications.