[TW5] Cannot edit a very long tiddler

166 views
Skip to first unread message

Kakyo

unread,
May 12, 2015, 6:07:20 PM5/12/15
to tiddl...@googlegroups.com
I have a very long TWc tiddler that I cannot even open to edit after upgrading (Firefox 37.0.2 with TiddlerFox).
FF keeps telling me there is a script running and prompts me to stop it.

How should I fix this?

Kakyo

unread,
May 12, 2015, 6:10:11 PM5/12/15
to tiddl...@googlegroups.com
By the way, if long tiddler is a realistic problem then I'm afraid this is going to create a lot of stress
when I write tiddlers, because I'll have to be conscious about the length of my text at all times.

I hope it's that I'm doing something terribly wrong.

Mark S.

unread,
May 12, 2015, 6:30:58 PM5/12/15
to tiddl...@googlegroups.com
Apparently TW5 runs a constant loop watching every keystroke. What I would like is to turn this off during draft mode. If my sidebar is out of date, that's fine with me.

There's a hack in this thread:

   https://groups.google.com/forum/#!topic/tiddlywiki/1cOZyZKKFrY

This will let you change the variable that is supposed to control timing around monitoring. However, it didn't seem to help much. Maybe it will work better for you?

If you're not running on nodejs, then you could also try the plugin "It's All Text". You configure this plugin and it lets you open the tiddler text in a separate editor.

You didn't mention what kind of hardware you're running, nor how big your tiddler is. Hardware power definitely makes a difference.

Good luck!
Mark

Mat

unread,
May 12, 2015, 6:35:38 PM5/12/15
to tiddl...@googlegroups.com
So based on your subject title and what you write, you upgraded from TWC to TW5, right?

How long is "long"? And what type of content is in it - pure text? 

I am not aware of any length restrictions for pure text (are there any for a html page?) but there are probably many snips of code that can cause problems if they are from TWC and run in TW5.

Is there only a problem with that single tiddler?

<:-)

Kakyo

unread,
May 12, 2015, 6:46:32 PM5/12/15
to tiddl...@googlegroups.com
It is not pure text.
It has many {{{}}} blocks, basically my code-snippets collections for all kinds of programming languages.
But no fancy syntax, just {{{}}} code blocks, plus !(banners), and bullets.

I just did a stat with Sublime Text of that tiddler

Word count for selected region

Words: 25567
Characters (ignoring whitespace): 142817
Characters (with whitespace): 201772
Lines: 5210

Forgot to say, it has non-ASCII characters like from CJK or European languages if that can be a factor.




On Tuesday, May 12, 2015 at 6:07:20 PM UTC-4, Kakyo wrote:

Kakyo

unread,
May 12, 2015, 6:57:29 PM5/12/15
to tiddl...@googlegroups.com

I'm using a Macbook Air 2012, see screenshot for my hardware info please.
I don't think this is anywhere near the bottom of the peers.

Funny, using the same machine with TWc, I tested copy-pasting a long article (pure text) multiple times into the same text box, which finished in a flash.
With TW5, the copy-pasting itself, like you mentioned, keeps triggering some processing, so I got more than a minute of lags.
This kind of performance is quite worrisome, and IMO with such important performance tweaks, there should be a configuration instead of a plugin.
I hope that the TW5 is not moving towards a heavyweight solution like MS Office. 

I love many aspects of TW5 such as the Control Panel and more detailed tiddler configurations.
IMHO, TWc shines with its simplicity and it gets things done. 
Although not perfect, it sets itself apart from all the other solutions on the market by its simplicity and outstanding performance.
I started making the switch out of the fear that TWc will one day be abandoned and by then I'd have too much legacy to move away from.

Eric Shulman

unread,
May 12, 2015, 9:24:32 PM5/12/15
to tiddl...@googlegroups.com
On Tuesday, May 12, 2015 at 3:46:32 PM UTC-7, Kakyo wrote:
It is not pure text.
It has many {{{}}} blocks, basically my code-snippets collections for all kinds of programming languages.
But no fancy syntax, just {{{}}} code blocks, plus !(banners), and bullets.

Oh!.. I have an idea why your content seems to be slowing things down:

In TWClassic, the triple-braces syntax ({{{ ... }}}) is used to designate a simple <code>...</code> block for formatting purposes.
In TiddlyWiki 5+, triple-braces is used perform "filtered transclusion" (see http://tiddlywiki.com/#Transclusion%20in%20WikiText).

As a result, when if paste your TWC-formatted content into a TW5 tiddler, each code snippet ends up being passed to the core's filter engine for processing and, even though it is very unlikely that any of the code snippets are valid TiddlyWiki filters, it still creates quite a bit more overhead just to parse that content.

To avoid this, you should change all occurrences of {{{ and }}} to ``` (tripled back-ticks), which is the TW5 syntax for formatting a code block.  If you do this before you paste it into a TW5 tiddler editor, then hopefully the massive slowdown you are currently observing will simply disappear.

let me know how it goes...

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...



Kakyo

unread,
May 12, 2015, 9:39:29 PM5/12/15
to tiddl...@googlegroups.com
Okie... That makes perfect sense now! Thanks Eric!
It's too late for me though... I clicked the upgrade button and now I can't even open it,
nor can I delete the tiddler altogether...

Well, I do have a TWc backup, which I can fix and re-import. 
It's just that this corrupt tiddler will be a ghost in my TW5 wiki.
Is there a way I can programmatically remove it? Should I just open the html in a text editor
and remove a certain section?

Danielo Rodríguez

unread,
May 13, 2015, 2:12:14 AM5/13/15
to tiddl...@googlegroups.com
If you have a backup of your original TWC, I recommend you to download a brand new copy of TW5 and start from scratch with the suggestions Eric has made.

Regards

PMario

unread,
May 13, 2015, 3:03:57 AM5/13/15
to tiddl...@googlegroups.com
Hi Kakyo,

 - Open the Developer Console with F12

 - Type: $tw.wiki.deleteTiddler("Your tiddler name")

should remove it.

-m

Kakyo

unread,
May 14, 2015, 2:24:28 PM5/14/15
to tiddl...@googlegroups.com
Thanks Mario! Worked like a charm!
I'm not a web developer. Does this mean that there is a set of exposed object API one can call to manipulate the entire wiki in the developer console?
If so, where is the API doc?

Thanks,
Beinan

PMario

unread,
May 14, 2015, 4:40:49 PM5/14/15
to tiddl...@googlegroups.com
On Thursday, May 14, 2015 at 8:24:28 PM UTC+2, Kakyo wrote:
Thanks Mario! Worked like a charm!

Good :)
 
I'm not a web developer. Does this mean that there is a set of exposed object API one can call to manipulate the entire wiki in the developer console?

Yes. We are in browser Javascript-land where the environment is sandboxed, but everything is public ;)
Basically the whole TW functionality is covered in $tw. The $tw.wiki.xxx functions manipulate the TW internal data store.

If so, where is the API doc?

:) In normal cases I's say read the tests [1], but I have to say: Read the source. Especially: boot.js[2] and wiki.js [3]. may be tiddler.js
Test coverage is at minimum. IMO contribution would be very welcome :)

IMPORTANT: Backup, backup, backup. if you play with your data!

WARNING: If you use those functions in the console, you have the possibility to mess things up, in a way, that may not be obvious and may cause problems in the future. eg: field names with possible but illegal characters like spaces  

Using "read" functions like $tw.wiki.getTiddler(), .filterTiddlers() ... are not problematic, since they don't modify the store.

On the other hand: .addTiddler(), .deleteTiddler(), ... may give you unexpected results. Eg. .addTiddler() needs the right tiddler fields, so tiddlers show up in the right sidebar ...

So you are welcome to play with it. .. But use a TestTW instead of your production data :)

have fun!
mario

[1] https://github.com/Jermolene/TiddlyWiki5/tree/master/editions/test/tiddlers/tests
[2] https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js
[3] https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/wiki.js
 

Beinan Li

unread,
May 15, 2015, 12:33:57 AM5/15/15
to tiddl...@googlegroups.com
Thanks very much for the details!

Thanks,
Beinan


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/o8v3_Y4cJNM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/33583101-d72a-49eb-960d-9faec928fa11%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages