From: Ihor Radchenko <email@example.com> To: Jean Louis <firstname.lastname@example.org>, Texas Cyberthal <email@example.com> Cc: "Dr. Arne Babenhauserheide" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org> Subject: Re: One vs many directories Date: Mon, 23 Nov 2020 22:16:24 +0800 Message-ID: <878sascg5j.fsf@localhost> (raw) In-Reply-To: <X7u2akPvvdbRmUxM@protected.rcdrun.com> Dear Jean Louis, Your description of the database reminds me how org-roam handles the files - it also uses an external database for linking and allows quick incremental search that does not really depend on where the files/headings are stored. However, what you are talking about is against org-mode philosophy, as I know it. Currently, the dev's stance is that org files must be self-sufficient. Org-mode should not depend on external database to manage the org files and operations with them. Everything must be plain text! Moreover, some devs are even reluctant to hide metadata (like unique ID implemented in org-id module) from users (which is possible and also partially implemented). Best, Ihor Jean Louis <email@example.com> writes: > * Texas Cyberthal <firstname.lastname@example.org> [2020-11-23 12:51]: >> Hi Dr. Arne, >> >> > The only part that hits performance limits is the agenda. >> >> Well, IIRC your Org Textmind is much smaller than mine. >> >> > My current guess is that the agenta is slow because it has to parse all my 7500 clock entries, and it has to check the Todo states of around 1200 headings. >> >> Ouch. I'd rather keep a "ramble log" so I can reconstruct an exactly >> honest time accounting, with discounts for partial attention, without >> worrying about fiddly clockin/outs. At least when working from home. >> If clocking into a work site, that's different, because one can >> reasonably bill for the entire time, with minimal clock toggling. >> > >> > Did you check against filesystem limits? At 10k entries in a >> directory typical filesystems start becoming slow. That's the main >> reason I see for adding hierarchies. > > From ext4 manual: > > dir_index > Use hashed b-trees to speed up name lookups in large > directories. This feature is supported by ext3 and > ext4 file systems, and is ignored by ext2 file systems. > > dir_nlink > This ext4 feature allows more than 65000 subdirectories > per directory. > > I think that file systems should be unlimited and fast in relation to > that. I have ~/Maildir with over 50000 subdirectories, direct access > is very easy and fast while listing takes some time. > > If file system does not allow fast access it is time to replace it > with one that does allow it. > > Now I wonder of HAMMER in DragonflyBSD is also slow with 50000 > directories. > > My PostgreSQL database is not huge, it is when packed about 50 MB. On > the file system it is 810 MB. > > To select 2469 contacts as subset of 204048 contacts that belong in > certain group does not give (usually) feeling of any delay, it looks > instant for human. > > My Org work is on meta-level so my truly important headings or subtree > names are in the database. Subtrees have their various properties, > like I can place any tags there inside, like TODO or designate type of > TODO. My work is intertwined with text and Org mode mostly, but I > could use any kind of mime type or any kind of Emacs mode. Some nodes > are on file system while some are in the database. > > Nodes within subtree are hyperdocuments, they are all linkable and > could be on file system or not on file system. > > Everything is together in one tree and it does not matter as access to > the nodes does not go over the tree necessary. There are 19197 nodes. > To find 76 that are tagged with TODO does not give me any slight or > visible delay, definitely not even 0.2 seconds. When I press enter it > is right there. > > From the system I am using personally I am thinking that Org mode > could get its database connection so that headings and properties are > managed in the database fully while text could be managed in files. It > seems very possible. > > The only thing that would be needed to add to Org in that case is some > heading tag that would uniquely designate where in the database that > heading is managed. It could be very lightly displayed on the screen > and would not be exported by default. > > Something like > > *** TODO Heading :ID-123: > > That would be all. All other meta data belonging to the heading could > be managed in the database. If heading is deleted it need not be > deleted in the database. Text belonging to heading could be managed in > the text file. Properties in the database. It can be simple database > such as GDBM if such is fast enough. > > Meta data for the heading would or could be updated automatically from > time to time. > > User could easily decide to show the properties in the Org file or not > to show. It does not matter much as long as :ID-123: tag is there. > > All things like tags, properties, clock-in and out, schedule, > deadlines, custom_id and everything else as heading meta data could be > manageable in the database. It could be copied into new headings. > Creation of heading like this: > > *** TitleRET > > would automatically invoke creation of heading 124 in the database and it would appear as: > > *** Title :ID-124; > > From there on user would be doing anything as usual in the Org mode > with the difference that properties would be displayed in the updated > manner and would not be really in the Org file. They would be > displayed on the fly. Any properties and plethora of other new > properties could be included. > > System would recognize automatically by saving the Org file or by > opening it: > > - If headings are in the right file, if file changed its place it > would be automatically updated in the database. > > - the heading ID would always remain unique no matter what, so users > linking to any heading would not need to worry of title remaining. The > unique ID that links to heading would basically link to the database > entry. Opening the link would ask database where the entry is located > and it would open up proper Org file at proper location without > parsing the Org file in usual manner. Org file would then remain > pretty much more text than it is now. > > - all the parsing and searching and indexing would be automatically > solved and human readable SQL queries could be easily customized by > user. Suddenly there would be much less commotion in work. Org files > would look much more humane readable then they are now. > >> 10k entries in a directory sounds inhumanely unergonomic. I guess my >> biggest flat name directory might eventually reach that size? In >> which case I could just split it in the middle of the alphabet, or >> similar solution. > > Like by first letters, like > > ~/Maildiremail@example.com > > Such sorting of files would be automatic. You would need to invoke a > command that sorts files that way automatically and that may also > quickly access such files automatically. > > I have comand that I often use, mkdatedir that makes me directory for > the current date. > > If I wish to make a database note for the day, the command today-note would make sure there is: > > - Year 2020 (formatted how I customize it) > - November (also formatted by custom) > - 2020-11-23 > And entry is automatically opened for the note. > > The system helps that I locate quickly the note that relates to the > day. But I can put multiple notes under same date and I can also have > same titles for those multiple notes. This is because each note has > its unique ID. > > I do not know how Org handles multiple same headings when linking to > it. It does not by default: > > [[Heading][Heading]] > > * Heading > > Text here > > * Heading > > > More text here. But if I wish to link here I need to do hac > > To me and my thinkin that is not really logical. There shall be always > unique ID for each heading. My mind is not comforted by Org system in > that sense. And I should not be thinking of the unique ID neither I > should be writing those links like [[Something][Here]] as they should > be constructed automatically. > > Myself I would like to come with cursor to second Heading and capture > the link to the heading. I would kill [[Heading][Heading]] into > special memory for those links. Then I could go to any other place in > the Org file and insert it there without thinking how link looks like > or constructing the link myself as it already exists in front of me. > > Constructing links by hand is fine for those which are external. > > Headings of Org files could be managed by the database in background. > Then all that distributed or sparse meta information (mess) disappears. > > What people are now trying to handle with Org files is management of a > database. Only that entries of the database are pretty much > disconnected from each other, vague, in unknown positions, then Org > algorhitms try to manage that all everything what is anyway built-in > in all SQL databases. Mess is growing over time. > >> A 10k entry directory is getting into enterprise territory, and I'm >> sure enterprise has tech tricks that become worthwhile at that scale. > > I will try with those options dir_index and dir_nlink to see if my > 50000+ directory becomes somewhat faster. Direct access to the > subdirectory is always very fast. I almost never do ls there neither > enter any such directory manually. They store emails, so I just click > one key in mutt, that key extracts the current email address such as > firstname.lastname@example.org and opens up ~/Maildiremail@example.com, one > among 50000. It is accessed by wanting to see previous conversation > with the contact, not by knowing what is the directory name or email > address, computer does that. It is simple system I use for years and > it is blazing fast. > >> There are scaling problems in every direction: Too many files per > >> directory, too large files, too much content per heading, too many > >> headings. > > To list more than 200,000 contacts does take some time but access to > the list from database is so much faster than ls in the ~/Maildir with > more than 50000 entries or subdirectories. I can relate to that. And I > still think that file systems should manage any numbers of entries. > >> There are scaling problems from too much deep tree nesting, namely too >> much fiddly ambiguous manual refiling. Solution is flat "solid name" >> directories just below feasible 10 Bins. Work fine. > > I have tried your solution and could not find the mental concept to > relate to my thinking. And I do agree that such solution could help > other people. > > For images I have some command like `sort-images.lisp' that just sorts > images by its embedded dates. Many times I sort even downloads per day.
next prev parent reply other threads:[~2020-11-23 14:37 UTC|newest] Thread overview: 151+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-21 0:33 Texas Cyberthal 2020-11-21 5:13 ` Ihor Radchenko 2020-11-21 7:56 ` Jean Louis 2020-11-21 8:31 ` Texas Cyberthal 2020-11-21 9:29 ` Marvin ‘quintus’ Gülker 2020-11-21 10:21 ` Jean Louis 2020-11-21 15:00 ` Texas Cyberthal 2020-11-21 16:08 ` Jean Louis 2020-11-21 15:03 ` Dr. Arne Babenhauserheide 2020-11-21 15:45 ` Texas Cyberthal 2020-11-21 17:12 ` Jean Louis 2020-11-21 18:01 ` Texas Cyberthal 2020-11-21 18:57 ` Jean Louis 2020-11-22 6:36 ` Ihor Radchenko 2020-11-22 7:20 ` Jean Louis 2020-11-22 8:32 ` Ihor Radchenko 2020-11-22 8:56 ` Jean Louis 2020-11-21 22:36 ` Dr. Arne Babenhauserheide [not found] ` <CAMUm491Psp0u5JKyGROP6M=UfAcvOLTtOKAD1rOearV+KxgYdQ@mail.gmail.com> [not found] ` <firstname.lastname@example.org> 2020-11-23 9:50 ` Texas Cyberthal 2020-11-23 13:17 ` Jean Louis 2020-11-23 14:16 ` Ihor Radchenko [this message] 2020-11-23 18:08 ` Is Org really so simple? Jean Louis 2020-11-23 20:41 ` Tom Gillespie 2020-11-24 5:06 ` Jean Louis 2020-11-26 3:08 ` Ihor Radchenko 2020-11-26 8:57 ` Jean Louis 2020-11-29 7:20 ` Ihor Radchenko 2020-11-29 16:22 ` Jean Louis 2020-11-26 18:07 ` Dr. Arne Babenhauserheide 2020-11-26 23:09 ` David Rogers 2020-11-27 0:43 ` Tim Cross 2020-11-27 2:56 ` Jean Louis 2020-11-23 16:07 ` One vs many directories Texas Cyberthal 2020-11-23 19:20 ` Jean Louis 2020-11-24 7:55 ` Ihor Radchenko 2020-11-28 16:16 ` Jean Louis 2020-11-28 16:33 ` Christopher Dimech 2020-11-25 6:57 ` Texas Cyberthal 2020-11-25 9:51 ` Jean Louis 2020-11-25 10:39 ` Texas Cyberthal 2020-11-25 11:02 ` Jean Louis 2020-11-26 16:04 ` Texas Cyberthal 2020-11-26 17:31 ` Jean Louis 2020-11-27 9:00 ` Texas Cyberthal 2020-11-27 10:45 ` Jean Louis 2020-11-28 8:18 ` Texas Cyberthal 2020-11-28 10:09 ` Jean Louis 2020-11-29 6:18 ` Texas Cyberthal 2020-11-29 6:53 ` Jean Louis 2020-11-30 7:35 ` Texas Cyberthal 2020-11-30 7:50 ` Ihor Radchenko 2020-11-30 10:25 ` Texas Cyberthal 2020-11-30 10:57 ` Jean Louis 2020-11-30 12:27 ` Ihor Radchenko 2020-11-30 12:28 ` Ihor Radchenko 2020-11-30 19:00 ` Jean Louis 2020-12-02 2:56 ` Ihor Radchenko 2020-12-02 6:14 ` Jean Louis 2020-12-02 7:23 ` Ihor Radchenko 2020-11-21 16:55 ` Jean Louis 2020-11-21 22:48 ` Dr. Arne Babenhauserheide 2020-11-22 0:48 ` Jean Louis 2020-11-22 2:47 ` briangpowell 2020-11-22 17:55 ` Jean Louis 2020-11-21 6:12 ` Palak Mathur 2020-11-21 9:04 ` Jean Louis 2020-11-21 6:36 ` Jean Louis 2020-11-21 7:17 ` Texas Cyberthal 2020-11-21 9:53 ` Jean Louis 2020-11-21 10:15 ` Tim Cross 2020-11-21 11:18 ` Jean Louis 2020-11-21 14:44 ` Texas Cyberthal 2020-11-21 15:45 ` Jean Louis 2020-11-23 5:40 ` Ihor Radchenko 2020-11-24 9:00 ` Jean Louis 2020-11-24 9:45 ` Eric S Fraga 2020-11-24 9:51 ` Jean Louis 2020-11-24 11:42 ` Eric S Fraga 2020-11-24 13:13 ` Diego Zamboni 2020-11-24 13:49 ` Jean Louis 2020-11-24 17:02 ` Jean Louis 2020-11-24 18:50 ` Dr. Arne Babenhauserheide 2020-11-24 18:58 ` Jean Louis 2020-11-25 6:39 ` Tim Cross 2020-11-25 12:38 ` Local variables insecurities - " Jean Louis 2020-11-25 13:05 ` Eric S Fraga 2020-11-25 13:13 ` Jean Louis 2020-11-25 13:58 ` Eric S Fraga 2020-11-25 14:07 ` Jean Louis 2020-11-25 20:54 ` Tim Cross 2020-11-25 22:09 ` Jean Louis 2020-11-26 2:06 ` Tom Gillespie 2020-11-26 5:06 ` Jean Louis 2020-11-26 5:31 ` Jean Louis 2020-11-26 6:18 ` Tom Gillespie 2020-11-26 9:10 ` Jean Louis 2020-11-26 11:44 ` Detlef Steuer 2020-11-26 12:06 ` Jean Louis 2020-11-26 5:34 ` Greg Minshall 2020-11-26 5:49 ` Jean Louis 2020-11-26 8:39 ` Christian Moe 2020-11-25 8:10 ` Dr. Arne Babenhauserheide 2020-11-25 8:36 ` Local variables liberties Jean Louis 2020-11-24 20:11 ` One vs many directories Tom Gillespie 2020-11-24 20:39 ` Tim Cross 2020-11-25 4:54 ` Jean Louis 2020-11-25 5:54 ` Tim Cross 2020-11-25 7:01 ` Local variables issue - " Jean Louis 2020-11-25 5:06 ` Jean Louis 2020-11-25 7:00 ` Tim Cross 2020-11-25 8:23 ` Security issues in Emacs packages Jean Louis 2020-11-25 9:07 ` tomas 2020-11-25 9:26 ` Jean Louis 2020-11-25 10:41 ` tomas 2020-11-25 22:46 ` Tim Cross 2020-11-25 23:07 ` Jean Louis 2020-11-25 23:39 ` Tim Cross 2020-11-26 5:24 ` Jean Louis 2020-11-26 6:46 ` Tim Cross 2020-11-26 5:29 ` Greg Minshall 2020-11-26 5:53 ` Jean Louis 2020-11-26 6:35 ` Tim Cross 2020-11-26 12:27 ` Greg Minshall 2020-11-26 22:20 ` Tim Cross 2020-11-27 2:19 ` Jean Louis 2020-11-27 4:42 ` Greg Minshall 2020-11-25 4:44 ` One vs many directories Jean Louis 2020-11-25 10:19 ` org-sbe to automate some source block executions Jean Louis 2020-11-25 11:39 ` Ihor Radchenko 2020-11-25 15:06 ` Jean Louis 2020-11-25 11:46 ` One vs many directories Jean Louis 2020-11-25 13:07 ` Eric S Fraga 2020-11-25 13:14 ` Jean Louis 2020-11-25 13:12 ` Ihor Radchenko 2020-11-25 13:32 ` Jean Louis 2020-11-24 18:47 ` Dr. Arne Babenhauserheide 2020-11-24 18:54 ` Jean Louis 2020-11-25 8:14 ` Dr. Arne Babenhauserheide 2020-11-25 8:46 ` Jean Louis 2020-11-25 11:46 ` Ihor Radchenko 2020-11-26 12:47 ` Jean Louis 2020-11-26 13:27 ` Ihor Radchenko 2020-12-02 10:12 ` Jean Louis 2020-12-02 9:49 ` Jean Louis 2020-11-26 3:47 ` Ihor Radchenko 2020-11-26 3:32 ` Ihor Radchenko 2020-11-26 11:58 ` Jean Louis 2020-11-29 7:56 ` Ihor Radchenko 2020-11-29 17:57 ` Jean Louis 2020-11-21 13:41 ` Jonathan McHugh 2020-11-21 14:04 ` Jean Louis
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://orgmode.org * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=878sascg5j.fsf@localhost \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Org-mode mailing list This inbox may be cloned and mirrored by anyone: git clone --mirror https://orgmode.org/list/0 list/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 list list/ https://orgmode.org/list \ firstname.lastname@example.org public-inbox-index list Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.yhetil.org/yhetil.emacs.orgmode nntp://news.gmane.io/gmane.emacs.orgmode AGPL code for this site: git clone https://public-inbox.org/public-inbox.git