2

I have 142 notes in Tomboy but I don't understand why is there such an amount of files and folders created inside the main folder of Tomboy. In there, there are 5 subfolders, named "0", "1"... "4" and in each one of them there are 100 subfolders named:

  • "0", "1", ..., "99", inside folder "0"
  • "100", "101", ..., "199" inside folder "1"
  • and so on...

Inside each subfolder there may be a file or two. In total, nautilus tells me there are about 1300 items inside the folder of Tomboy.

Can someone please explain to me why is this so? My concern is that I sync these notes on Dropbox which, I think, might have a hard time to crawl all these folders for changes, eg. when starting Ubuntu. Correct me please if this isn't true.

1
  • Thanks for tagging with /tomboy. I wasn't allowed to create that tag :) Commented Aug 28, 2011 at 14:58

1 Answer 1

1

That kind of multiple level directory structure is a common solution to speed up file retrieval when you have to handle a large number of files. A lot of other application use that kind of structure to keep some kind of file cache (e.g. firefox, squid).

Instead of a single large directory with all the files, the application create a structure of subdirectories and uses some rule to choose in which directory to put each file. In this way, it is easier and quicker to find the needed file.

Let's do a simple example: If I want to keep a file for each one of my customers. I'll create a directory for each alphabet letter and then, in each one of these directories, a directory for each alphabet letter. Now I can put "DimitrisTzortzis.info" file in the T/D directory.


From this point, I start to do some supposition based only on my experience, because I do not know the details of dropbox and tomboy implementations.

Usually, to manage a large structure of nested subdirectory is easier than to manage a single large directory (at least, on unix filesystems). This should be true also for dropbox so you do not have to worry about this. That "strange" structure will help dropbox to speed up the things.

Unluckily Tomboy directory structure seems to grow when you create new notes and not to shrink when you delete them. This could explain why your structure is so big with so few notes in it.

1
  • Great answer! Thank you very much! It really helped me :) Commented Sep 1, 2011 at 8:04

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.