The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Today's Posts

 
rebuild database not doing anything? Thread Tools Search this Thread Display Modes
Unless I'm missing something, the rebuild database option (from file menu) doesn't seem to be doing anything any more.

I have seen my .ofocus file grow to several megs on a weekly basis. The only thing that slims it back down is doing an export and replacing the OmniFocus.ofocus file with the exported file. While this works, it is certainly annoying -- especially since this is what the rebuild claims to do.

Am I missing something, or is this a bug?

Thanks,
Jason
 
What are your sync settings?

Database bloat is usually caused by OF being set to synchronize multiple devices and one of them isn't being sync'ed often enough. OF has to keep a timeline of all the changes made on every device so that they can be brought into sync. If one device isn't being sync'ed the timeline of events can get very large.

(I also once saw a problem like you describe after I had experimented with sync'ing, then turned it off. Turning sync'ing back on, then back off, solved that problem for me. That was during the 1.1/1.5 sneaky peeks. I haven't seen it on the latest round.)
__________________
Cheers,

Curt
 
I'm syncing to a webdav server via https (self-signed cert, in case that matters).

There are only two clients -- my laptop and my iPhone, and the iPhone is synced at least once a day, if not more frequently.

I synced my iPhone immediately before trying to rebuild the db the last time I tried to rebuild, to no effect.

It's not unique to my computer/iPhone either, the same thing is happening on my wife's OmniFocus. Of course, hers is configured the same way as mine -- a webdav sync (a different folder).

Thanks,
Jason
 
IIRC, the two machines must sync within 1 hour of each other in order to clear the transaction log. If that doesn't solve it, you should contact the support ninjas (Help --> Send Feedback).
__________________
Cheers,

Curt
 
Curt--

Thanks for the suggestion. I just watched my file go from 640kb to 444kb by sync'ing both my iPhone and laptop OF within a minute or two of each other.

So that's good.

Then I did a rebuild to see if I could shrink the db further... no dice. It's still 444kb.

If I export the db, it goes down to ~60kb.

While it may not seem like a lot, there is a noticeable speed difference in sync'ing between 450kb and 60kb. The difference is much bigger when my db file used to grow to 5mb or even 20mb...

So, back to my original question, is this expected/normal behavior, or should the rebuild be doing more?

Thanks,
Jason
 
Rebuilding the database doesn't change the need to keep a transaction trail for any devices/clients which aren't fully up to sync, and that transaction tail (stored as many little zip files in the package) is what causes the database file to swell.

If you cause all your devices/clients to be synchronized now, and repeat that operation again in an hour, you should get more compaction. If you are in the habit of only having OmniFocus open in one place at a time, your database may tend to stay larger because of this, and there will be more times when a larger amount of work needs to be done in a sync. The sync code allows up to an hour for a slow client to go through the motions, so the two complete syncs an hour apart will squash the transaction trail down to minimal size. If you do a Show Package Contents view in the Finder on the OmniFocus.ofocus file, you can see the dates on all the component files and see how the compaction takes place.
 
I guess that's where I'm confused. When I select Rebuild from the menu, I get a popup that explains this...

"Rebuilding your OmniFocus database will analyze and consolidate all of your entries to make sure they are consistent.

This is essentially equivalent to backing up and then restoring your database...."

I guess a backup/restore is different than an export/replace, but I would have expected the file to shrink by a similar amount.

I guess I'll stick to a manual process. No amount of syncing and rebuilding will get the database down to the size it will get on an export/replace. And it's much more valuable for me to be able to sync quickly (and open quickly on the iPhone) than to see my history in time machine.

Thanks for helping me understand what's going on under the hood.
-Jason
 
Quote:
Originally Posted by jcg3 View Post
I guess a backup/restore is different than an export/replace, but I would have expected the file to shrink by a similar amount.
In OmniFocus 1.6 (released yesterday evening), you can use Compact Database (just below Rebuild Database) to rewrite your database as a single transaction. However, please note that Compact Database is only available when syncing is turned off, since compacting a database loses its sync history. (The Compact Database command is equivalent to the export/replace procedure you've been doing.)

For OmniFocus 1.7 (and possibly 1.6.1), we've implemented a refinement to the OmniFocus sync compaction algorithm which can significantly reduce the number of transactions required for syncing. Right now, we can only compact transactions after they've merge back into a single branch of changes—but the new algorithm can compact all consecutive changes which have already been seen by every sync client (even when they weren't seen around the same time).

This change can significantly reduce the number of transactions in databases which have multiple clients that only sync intermittently. In my test cases (taken from real-world sync data), this new algorithm was able to compact 62-65% of the transactions (reducing 250 transactions to ~92).

This change isn't quite ready for prime time just yet (we need lots of testing for a change this big), but hopefully it will be within the next few weeks.
 
Quote:
Originally Posted by jcg3 View Post
I guess I'll stick to a manual process. No amount of syncing and rebuilding will get the database down to the size it will get on an export/replace. And it's much more valuable for me to be able to sync quickly (and open quickly on the iPhone) than to see my history in time machine.
That transaction trail isn't kept so you can see your history, but rather so OmniFocus has a fighting chance at successfully merging the changes together when you make changes on multiple devices and then try to sync them all.
 
Thanks guys. I'm looking forward to seeing the changes in v1.6, as well as future releases.

-Jason
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up a new database? lorew OmniFocus 1 for Mac 4 2011-06-22 10:20 AM
"database on your iPhone is incompatible with the sync database" error message kevinwest66 OmniFocus Syncing 36 2011-05-08 03:32 PM
Coalesce or rebuild database? Jody Severson OmniFocus 1 for Mac 1 2008-09-04 06:22 PM
Help - Can't Quit or Rebuild Database eronel OmniFocus 1 for Mac 7 2007-12-13 10:46 AM


All times are GMT -8. The time now is 01:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.