Al 30/01/11 22:51, En/na Matt Lundin ha escrit: > Pere Quintana Seguí <[email protected]> writes: > >> In my current system, I have about 200 .org files. With this number of >> files, building the agenda is very slow in my home computer and, also, >> makes the performance of MobileOrg quite poor. >> >> So, I would like to join files, to increase the system's performance. > > FWIW, I've found the opposite to be true. Splitting up larger files and > reducing the depth of the hierarchy marginally improves agenda > performance (~ 0.2 seconds acc. to elp). But in my case, I split 10 > files into 40, so I have no idea what 200 files would do. Perhaps > there's a sweet spot somewhere? I also haven't used mobile org.
So, maybe my initial assumption is wrong.
Has anybody run some experiments to check if it is better to have a
small number of big files or many small files?
> In my experience, archiving old items and reducing the number of active
> todos is the best way to keep the agenda snappy.
>
>> Is there any script to cleanly join files, by transforming the title of
>> the file in a first level heading (*) and adding an star to all other
>> headings of the file?
>
> Perl is always handy for this type of thing:
>
> --8<---------------cut here---------------start------------->8---
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my $mergefile = "/tmp/merged.org";
>
> open NEWFILE, ">", $mergefile
> or die "Can't open $mergefile: $!";
>
> while (<>) {
> s/^(\*+)/*$1/;
> s/^#\+TITLE:\s+(.*)$/* $1/;
> s/^(#\+\w+:.*)$/: $1/;
> print NEWFILE "$_";
> }
>
> close NEWFILE;
> --8<---------------cut here---------------end--------------->8---
>
> Note: This is a quick proof of concept. Use at your own risk. ;)
Great, thank you!
Pere
--
Dr. Pere Quintana Seguí
Observatori de l'Ebre (Universitat Ramon Llull - CSIC)
Horta Alta, 38. 43520 Roquetes (Tarragona), Spain.
T. (+34) 977 500 511 - F. (+34) 977 504 660
http://www.obsebre.es - http://pere.quintanasegui.com
GnuPG:2CAB4330
http://pere.quintanasegui.com/coses/key-transition.txt
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. [email protected] http://lists.gnu.org/mailman/listinfo/emacs-orgmode
