Mark,

I've found this old post of yours 
<https://groups.google.com/forum/#!msg/tiddlywiki/1cOZyZKKFrY/yuCdOtYBTAMJ>, 
again, in relation to performance issues specifically related to typing. 
This was even before TypingTimeout was a user-adjustable setting.

This led me to experiment with an altogether different approach that has 
tentatively *solved the issue*. Now I can type with no lag at all, but 
unfortunately this approach requires that a tiddler I'm typing into is 
constantly open (a 'draft of' tiddler), so as such it's a band aid approach.

The reasons behind this is that TW exempts draft tiddlers from constant 
refreshes or at least allows us to defer processing by a value we set in 
TypingTimeout, which regrettably is a value that only affects draft 
tiddlers (the ones that remain in editing mode).

Example code:

<$edit-text tiddler="Draft of 'text'"/>


   1. Create a tiddler titled text, save it
   2. Open the tiddler and navigate away from it (without closing it or 
   saving it)
   3. Open a tiddler with the edit-text widget and type with no lag
   
This is the level of typing experience I was expecting.

Now I have to figure out how I can prevent this open text tiddler from 
being constantly referenced in a red notification rectangle and to prevent 
TW from saving it, because once it exits editing mode the lag is 
reintroduced.

Regards,
Hubert



On Friday, 11 October 2019 09:09:34 UTC+1, Hubert wrote:
>
> Hi Mark,
>
> My TW now has 63k entries, and, in a meeting the other day,I was able to 
>> look up entries about as fast as people asked.
>>
>
> That's impressive. Did you use a search bar or your own <edit-text/> 
> widget? I'm particularly interested if it was the latter.
>
> But that was using a Kindle Fire, which might have a stronger processor
>> than a motorola phone.
>>
>> I don't believe you've mentioned what browser you're using. My tests were 
>> on an old version of FF that I'm not upgrading because it
>> can still use TiddlyFox.
>>
>> It might be worth experimenting with different browsers. I believe 
>> browser makers have wide latitude in how they implement JS internals.
>>
>
> I'm now at a Windows PC with i7 processor, 8 gigs of RAM and running 
> latest FF. The lag is still there, albeit of course not that annoying as on 
> mobile. Same issue on Chrome.
>
>
> On Thursday, 10 October 2019 16:29:56 UTC+1, Mark S. wrote:
>>
>> In my case, I kept the tags but removed all usage of the tag filter 
>> operator. My TW now has 63k entries, and, in a meeting the other day,
>> I was able to look up entries about as fast as people asked. But that was 
>> using a Kindle Fire, which might have a stronger processor
>> than a motorola phone.
>>
>> I don't believe you've mentioned what browser you're using. My tests were 
>> on an old version of FF that I'm not upgrading because it
>> can still use TiddlyFox.
>>
>> It might be worth experimenting with different browsers. I believe 
>> browser makers have wide latitude in how they implement JS internals.
>>
>> Good luck!
>>
>>
>> On Thursday, October 10, 2019 at 8:00:47 AM UTC-7, Hubert wrote:
>>
>>> Sounds counter-intuitive, but I've just checked it nevertheless.
>>>
>>> Nope, 400 is much worse in my case.
>>>
>>> The circumstantial evidence I have so far is pointing to tags...
>>>
>>> On Thursday, 10 October 2019 15:49:30 UTC+1, Mark S. wrote:
>>>>
>>>> I you know, I think experienced this before, and commented. Try 
>>>> resetting the timeout back to 400 and reloading.
>>>>
>>>> After setting the TO to 60000, it feels *slower* when typing into the 
>>>> input box.
>>>>
>>>> On Thursday, October 10, 2019 at 5:53:07 AM UTC-7, Hubert wrote:
>>>>>
>>>>> Hi Mark,
>>>>>  
>>>>>
>>>>>> Just testing now, and setting it to 60000 doesn't seem to impact the 
>>>>>> speed with regular editing nor inside a form box.
>>>>>>
>>>>>
>>>>> Have you reloaded the wiki after setting it to 60000? It might not 
>>>>> take effect until reloaded.
>>>>>
>>>>> Is there anything special about your TW file? Have you tested on an 
>>>>>> empty ?
>>>>>>
>>>>>
>>>>> No and yes, respectively.
>>>>>
>>>>> The lag on mobile may be more or less noticeable, which could even 
>>>>> depend on the size of the wiki and/or on the number of tiddlers currently 
>>>>> open. I lack the knowledge to draw conclusions but I do suspect it has to 
>>>>> do with the refresh mechanism.
>>>>>
>>>>> BTW. my wiki is just slightly over 5 megs.
>>>>>
>>>>> Regards,
>>>>> Hubert
>>>>>
>>>>>
>>>>> On Wednesday, 9 October 2019 21:15:04 UTC+1, Mark S. wrote:
>>>>>>
>>>>>> I've mentioned typing speeds in the past. I never found that the 
>>>>>> draft speed setting really changed anything one
>>>>>> way or the other. Maybe it makes a difference on Mac but not on 
>>>>>> Android.
>>>>>>
>>>>>> Just testing now, and setting it to 60000 doesn't seem to impact the 
>>>>>> speed with regular editing nor inside a form box.
>>>>>>
>>>>>> Is there anything special about your TW file? Have you tested on an 
>>>>>> empty ?
>>>>>>
>>>>>> Good luck!
>>>>>>
>>>>>> On Wednesday, October 9, 2019 at 12:49:43 PM UTC-7, Hubert wrote:
>>>>>>>
>>>>>>> Hi Mark,
>>>>>>>
>>>>>>> What vintage is your phone?
>>>>>>>
>>>>>>>
>>>>>>> It's a fairly recent midrange Motorola. 
>>>>>>>
>>>>>>> What version of TW are you using? There are size/speed improvements 
>>>>>>>> in 5.1.20.
>>>>>>>
>>>>>>>
>>>>>>> I'm using the latest stable TW version (5.1.21).
>>>>>>>
>>>>>>> I tried your test on the full downloaded TiddlyWiki.com page on my 
>>>>>>>> 2012 era samsung phone. The speed of course was slow, but it was the 
>>>>>>>> same 
>>>>>>>> for the edit box as for editing the tiddler itself.
>>>>>>>
>>>>>>>
>>>>>>> Thanks for having a go with the test on mobile. Have you modified 
>>>>>>> the TypingTimeout value before testing? I'm having a "native" (no lag) 
>>>>>>> typing experience when editing a tiddler after setting the value in 
>>>>>>> $:/config/Drafts/TypingTimeout to 60000. By default, this value is 
>>>>>>> around 
>>>>>>> 400 (ms), which results in a noticeable lag in my case, so just 
>>>>>>> wondering.
>>>>>>>
>>>>>>> You probably know this already, but be sure to not have your 
>>>>>>>> "recent" tiddler opened in the sidebar.
>>>>>>>
>>>>>>>
>>>>>>> Yes, I do :). I have it disabled across the whole wiki.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, 9 October 2019 19:55:31 UTC+1, Mark S. wrote:
>>>>>>>>
>>>>>>>> What vintage is your phone?
>>>>>>>>
>>>>>>>> What version of TW are you using? There are size/speed improvements 
>>>>>>>> in 5.1.20.
>>>>>>>>
>>>>>>>> I tried your test on the full downloaded TiddlyWiki.com page on my 
>>>>>>>> 2012 era samsung phone. The speed of course was slow, but it was the 
>>>>>>>> same
>>>>>>>> for the edit box as for editing the tiddler itself. In either case, 
>>>>>>>> the upper limit to typing was my ability to use the tiny keyboard.
>>>>>>>>
>>>>>>>> You probably know this already, but be sure to not have your 
>>>>>>>> "recent" tiddler opened in the sidebar.
>>>>>>>>
>>>>>>>> Good luck!
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tuesday, October 8, 2019 at 7:47:00 AM UTC-7, Hubert wrote:
>>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Before I go into details, my $:/config/Drafts/TypingTimeout 
>>>>>>>>> tiddler has a value of 60000 (60 seconds), which fixed the lag when 
>>>>>>>>> entering text / typing in a tiddler in edit mode.
>>>>>>>>>
>>>>>>>>> However, I'm still experiencing lag when entering text using 
>>>>>>>>> <$edit-text/> widgets (of course, the tiddler being populated as I 
>>>>>>>>> type is 
>>>>>>>>> separate to the one that has the edit-text widget).
>>>>>>>>>
>>>>>>>>> This lag is negligible on my Chromebook or Windows PC (I have no 
>>>>>>>>> means of measuring it but even if it's 5ms then it's not much to 
>>>>>>>>> worry 
>>>>>>>>> about) but it is very noticeable on Android (using Chrome as an 
>>>>>>>>> example). 
>>>>>>>>> It gets better if I close all tiddlers except the one that has the 
>>>>>>>>> <$edit-text/> widget and I assume that the lag has to do with 
>>>>>>>>> TiddlyWiki 
>>>>>>>>> re-rendering all the open tiddlers as I type (though I'm not sure if 
>>>>>>>>> that's 
>>>>>>>>> the case).
>>>>>>>>>
>>>>>>>>> What exactly is introducing the lag when using <$edit-text/> 
>>>>>>>>> widgets? Is it realtime rendering? If so, could the scope of 
>>>>>>>>> $:/config/Drafts/TypingTimeout be extended to also include 
>>>>>>>>> <$edit-text/> 
>>>>>>>>> widgets, so that the lag is fixed at the expense of instantaneous 
>>>>>>>>> rendering? Is there any other mechanism that is at fault here? I do 
>>>>>>>>> not 
>>>>>>>>> believe that we should require a multicore workstation to have a 
>>>>>>>>> smooth 
>>>>>>>>> typing experience.
>>>>>>>>>
>>>>>>>>> Typing into a tiddler in edit mode and entering text in a password 
>>>>>>>>> prompt both work with absolutely no lag on mobile (this is the 
>>>>>>>>> 'native' 
>>>>>>>>> typing feel), but these are the only two examples.
>>>>>>>>>
>>>>>>>>> The <$range/> widget seems to suffer from the same lag 
>>>>>>>>> occasionally (it's not super smooth) but I'm not sure if it's 
>>>>>>>>> affected by 
>>>>>>>>> the same root cause.
>>>>>>>>>
>>>>>>>>> Finally, apologies for awkward phrasing; English is not my first 
>>>>>>>>> language.
>>>>>>>>>
>>>>>>>>> Many thanks,
>>>>>>>>> Hubert
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fe01d5db-9694-480a-bb2a-bd0625a0812e%40googlegroups.com.

Reply via email to