tiddlywiki overweight

19 views
Skip to first unread message

lapin

unread,
Aug 30, 2009, 3:04:24 AM8/30/09
to TiddlyWikiDev
Good morning all,

I'm using Tiddlywiki at work, on a small scale with a coworker,
and have it hosted on a shared driver. In order to avoid conflicting
editions I added the plugin TiddlyLock [http://www.minormania.com/
tiddlylock/tiddlylock.html].

I'm getting slightly concerned by the weight of index.html: 350Ko.
Repeated savings led to having a folder weighing 85Mo in one week
alone. Serendipity made me come across 'Asciencepad' which, along with
WYSIWYG edition facilities, has its index.hml that only weighs 5Ko.
I've had a quick look and saw that many if not all scripts have been
externalized.

The main script on Tiddlywiki is: 'jsArea' and counts thousands of
lines. I merely cut it out, saved it away in a subfolder and had it
called in in the index.html. Too simple, it does not work. All I get
is a white page.
The file index.html weighs now 50 or so Ko so I'm working on this
tweaking of the original empty index.html to make it work.

Question: has anybody preceded me on this? I would appreciate a hand
here.

Thank you.

Pascal

Eric Shulman

unread,
Aug 30, 2009, 3:26:38 AM8/30/09
to TiddlyWikiDev
> I'm getting slightly concerned by the weight of index.html: 350Ko.
> Repeated savings led to having a folder weighing 85Mo in one week

Is there some reason why you are keeping so many old backup files?
Once you are confident of the changes that have been made, you can
discard all those files. The only file you *need* to keep around is
the current index.html.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

lapin

unread,
Aug 30, 2009, 3:57:56 AM8/30/09
to TiddlyWikiDev
Morning,

Maybe this is something I haven't understood about Tiddlywiki but
aren't those back up files supposed to be kept in order to be able to
go back in time and compare? The rate at which the folder fills in I
will have to decide to delete older versions but I'd hate to do so
which is why I posted my question.

Pascal

Eric Shulman

unread,
Aug 30, 2009, 4:26:31 AM8/30/09
to TiddlyWikiDev
>  Maybe this is something I haven't understood about Tiddlywiki but
> aren't those back up files supposed to be kept in order to be able to
> go back in time and compare? The rate at which the folder fills in I
> will have to decide to delete older versions but I'd hate to do so
> which is why I posted my question.

TiddlyWiki doesn't include any built-in per-tiddler "revision history"
functionality, and does not do any kind of automated comparisons with
the contents of the backup files.

Essentially, while TW operates like a website and has more features/
functionality than many applications, it is really just another kind
of document type, much like word processing or spreadsheet files
(though without the need for an external 'runtime' application other
than a standard web browser).

As a general guide, whatever backup strategies you current use in your
group for shared word processing and spreadsheet files would be
applicable to TW files as well. You can, of course, keep old backup
files around for as long as you want to, but they aren't intrinsically
*required* for proper operation of any given TW document.

Note: there are several plugins that can be used to modify the backup
file creation strategy to reduce the number of files that accumulate
over time. For links to these plugins, please see:
http://tiddlywiki.org/wiki/Backup

Ove Ridé

unread,
Aug 30, 2009, 4:29:51 AM8/30/09
to tiddly...@googlegroups.com
Nope, These files are nothing but snapshots of the old TiddlyWiki at
that point in time. TiddlyWiki does never read those files again, but
they're there in case something goes wrong, so you have an instance to
fall back on. Unless/until you delete/modify a tiddler, or an error
occurs, the files are redundant. A backup is created as soon as you
save anything, which is probably too much for the average user.
One thing you can do is to delete excessive backups by only keeping
one backup from each day, or one backup from each week, or similar.
Or, you could archive the files which should reduce the size drastically.
Under anything UNIX-ey, this should work:

tar -cvjf basename.tar.bz2 basename.2009*

j specifies bzip2 compression which is slightly more effective than
gzip, and thus suitable for archival. You can of course use gzip
instead.
tar -cvzf basename.tar.gz basename.2009*

You can of course store each month in a different archive if you so wish.
tar -cvjf basename-200908.tar.bz2 basename.200908*

When archived you can safely remove the relevant backup files.
rm basename.200908*

On anything Windows-ey, WinRAR with maximum compression and the option
"Create solid archive" enabled should give you a good compression.
Good luck!

2009/8/30 lapin <pascalle...@gmail.com>:
--
/Ove

-----BEGIN 2ROT13 MESSAGE-----
Blog:
<http://gameboygenius.8bitcollective.com/>
SKRIVA på Lysator. Ditt Ahrvid-fria alternativ:
<http://lists.lysator.liu.se/mailman/listinfo/korkek?SKRIVA?>
Sätt på ett par flipflops, vippa på rumpan
och gör det här till en minnesvärd sommar!
-----END 2ROT13 MESSAGE-----

lapin

unread,
Aug 30, 2009, 4:54:04 AM8/30/09
to TiddlyWikiDev
Dear all,

I'm afraid this thread is taking the wrong direction. No offense
but the back-up files and in particular their number of weight pointed
out a problem: the weight of the index.html file itself. Externalizing
scripts seems to be the answer (reference to Asciencepad) but cannot,
so it seems, be done that easily.

Any information about how to achieve this is what I am interested
in. Again, please take no offense anybody, but I'd like to read more
about this.

Thank you Eric for the link to http://tiddlywiki.org/wiki/Backup

Pascal

On 30 août, 11:29, Ove Ridé <nitro2...@gmail.com> wrote:
> Nope, These files are nothing but snapshots of the old TiddlyWiki at
> that point in time. TiddlyWiki does never read those files again, but
> they're there in case something goes wrong, so you have an instance to
> fall back on. Unless/until you delete/modify a tiddler, or an error
> occurs, the files are redundant. A backup is created as soon as you
> save anything, which is probably too much for the average user.
> One thing you can do is to delete excessive backups by only keeping
> one backup from each day, or one backup from each week, or similar.
> Or, you could archive the files which should reduce the size drastically.
> Under anything UNIX-ey, this should work:
>
>  tar -cvjf basename.tar.bz2 basename.2009*
>
> j specifies bzip2 compression which is slightly more effective than
> gzip, and thus suitable for archival. You can of course use gzip
> instead.
>  tar -cvzf basename.tar.gz basename.2009*
>
> You can of course store each month in a different archive if you so wish.
>  tar -cvjf basename-200908.tar.bz2 basename.200908*
>
> When archived you can safely remove the relevant backup files.
> rm basename.200908*
>
> On anything Windows-ey, WinRAR with maximum compression and the option
> "Create solid archive" enabled should give you a good compression.
> Good luck!
>
> 2009/8/30 lapin <pascallerudul...@gmail.com>:

wolfgang

unread,
Aug 30, 2009, 6:55:57 AM8/30/09
to TiddlyWikiDev
> but the back-up files and in particular their number of weight pointed
> out a problem: the weight of the index.html file itself. Externalizing
> scripts seems to be the answer (reference to Asciencepad) but cannot,
> so it seems, be done that easily.
>
> Any information about how to achieve this is what I am interested
> in. Again, please take no offense anybody, but I'd like to read more
> about this.
>

There is a simple plugin which saves only all tiddler's store Area
without the js core in a text file:

http://www.potto.client.jp/#%5B%5BBackup2Text%20Macro%5D%5D

Eric's ExportTiddlersPlugin can do the same and much more, but
therefore is also much larger:

http://www.tiddlytools.com/#ExportTiddlersPlugin

To restore from such a StoreArea backup you have to import theses
externalized tiddlers into a empty TW again.


Externalizing the actually core isn't that difficult, take a look how
Saq has it done for compression purposes:

http://tinytiddly.lewcid.org/

Also Bram's PTW externalizes it's core and plugins:

http://ptw.sourceforge.net/ptwe.html

hope that helps you further..

Regards

wolfgang

unread,
Aug 30, 2009, 9:01:34 AM8/30/09
to TiddlyWikiDev
> Externalizing the actually core isn't that difficult, take a look how
> Saq has it done for compression purposes:
>
> http://tinytiddly.lewcid.org/
>

Actually TinyTiddly is still version 2.4.3 (the last version without
jQuery included in the core).

For the latest alpha release compressed and core externalized see
here:

http://www.jonrobson.me.uk/development/TinyTiddly/

lapin

unread,
Aug 30, 2009, 9:24:22 AM8/30/09
to TiddlyWikiDev
Thanks Wolfgang,

That seems to be exactly what I was looking for: index.html down
to 23Ko WooT!! ^_^ Hopefully it'll be compatible with tiddlylock
plugin.

Pascal
Reply all
Reply to author
Forward
0 new messages