How to use plaintext?

Pacerier
Posts: 32
Joined: Fri Mar 31, 2017 6:40 pm
Contact:

How to use plaintext?

Postby Pacerier » Tue May 02, 2017 7:18 am

The styling is causing Cintanotes to run slowly. Is there any way I can use fast plaintext mode for the notes?
---
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Wed May 03, 2017 10:02 am

What actions exactly are slow?
Why did you decide that styling is the cause of the slowdown?

Thanks
Alex
Pacerier
Posts: 32
Joined: Fri Mar 31, 2017 6:40 pm
Contact:

Re: How to use plaintext?

Postby Pacerier » Thu May 04, 2017 11:43 am

1. Sometimes I double-click to open a long note.

The opened window lags and blinks and blinks and blinks. Should be due to it trying to display {italic, bold, link} styles for the words and links.

2. Sometimes I double-click to open a long note and start typing.

The opened window lags and blinks and blinks and blinks and what I typed gets displayed really slowly. Should be due to it trying to display {italic, bold, link} styles for the words and links. Sometimes it even crashed here with "cintanotes not responding".
---
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Thu May 04, 2017 12:22 pm

I need an example of such a note.

This is not a performance issue, this is most probably a bug that causes code to cycle and eventually overflows stack.
Can you find such a note and send it to me in XML format?
Thanks!
Alex
Pacerier
Posts: 32
Joined: Fri Mar 31, 2017 6:40 pm
Contact:

Re: How to use plaintext?

Postby Pacerier » Thu May 04, 2017 2:07 pm

The opened window lags and blinks and blinks and blinks and finally appears without errors, after somewhere between ~1 to ~10 seconds.

This must be a performance issue isn't it? It's the same for every long note I have.
---
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Thu May 04, 2017 3:35 pm

CintaNotes Developer wrote:I need an example of such a note.
Go to images.google.com and search for an image. When the focus is on the page press the End key 4 times, and click 'show more.' Then press the End key a few more times, about 5 or 6. Then press Ctrl-A, and the clipping key. (The retain HTML formatting must be enabled of course.) Then open that note.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Thu May 04, 2017 7:43 pm

Thanks date!

Yes, I was able to reproduce and fix the issue.
Please try this version: http://cintanotes.com/files/beta/CintaN ... _Beta1.zip
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Fri May 05, 2017 9:35 am

Appears much faster! It didn't occur to me this was a performance issue or something fixeable. But 'up to 10 seconds'... I wonder how long those notes must be...
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Fri May 05, 2017 11:12 am

I managed to have a lag of more than a minute (I didn't sit it out) by clipping this whole page: https://en.wikipedia.org/wiki/List_of_A ... n_treaties . About 1 mb of text with links and formatting.
In this version: 2 seconds delay before opening, when opened it doesn't lag, when closing the note there is a 10 second lag. And it appeared as if search is a bit slower. Deleting the note took 5 seconds.
So there definitely is some great performance improvement here. I can imagine things aren't going to be instant when you have multiple of such 1 MB notes though.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Mon May 08, 2017 10:58 am

Thanks, date!
There's still room for improvement there. However it will require much more effort. For the usual data I think the current version is good enough :)

The slower search speed is weird, are you able to prove it? Seems I've touched nothing that could have affected search speed.
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Tue May 09, 2017 6:41 pm

The slower search speed is weird, are you able to prove it? Seems I've touched nothing that could have affected search speed.
Why weird? It is not something that changed recently. Search is instant on 10.000 notes averaging 1 kb, but very slow on a few large notes, like one or two of those 900 kb wikipedia articles. It does not matter if those two 900 kb notes are added to the 10.000 or if they are in a separate section. I can probably prove it but it seems obvious to me?
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Tue May 09, 2017 8:11 pm

It takes roughly about 200 ms to search on the largest wikipedia article. On the 2 largest, 400 ms. It doesn't matter if they are in an existing large notebook or in an empty one, those 200 ms each just get added to the established notebook search speed. That doesn't seem much but on two of my notebooks with thousands of notes it takes about 100 ms for each search.


The time it takes to lift one finger and press the next key averages 150 ms. The time it takes for your eyes to register the next image is obviously much lower so if the expected image doesn't catch up with your typing speed I definitely consider it 'noticeable.'


Ahk script for measuring search speed here. Not neccesarily highly accurate but there is no doubt that with one very large note search takes twice as long.

Code: Select all

;get the letter 'e' on the clipboard, run this and paste it in CN search with ctrl-v. then clip one or two of the largest wikipedia articles and try again.

^V::
IfWinActive, ahk_class CintaNotes.MainFrame
{
ControlGetText, out, Cinta.Label1
ControlGetText, out2, Cinta.Label1
ttime = % A_TickCount
sendinput ^V

while out =out2{
   controlgettext, out2, cinta.label1   
    continue
   }
msgbox % A_TickCount-ttime
}
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Wed May 10, 2017 7:14 am

I meant that the search speed per se shouldn't have changed recently.
Of course it is depentant of the kind of notes you have.

Thanks for the script, it'll come in handy. BTW did you notice of there's any change of speed regarding if the large note stays in the "found" list, compared when it goes out of it (i.e. doesn't contain the search phrase anymore)?
Also it would be useful to limit the search scope to 'text only' to make sure that it's text matching that is slow.
Alex
date
Posts: 243
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: How to use plaintext?

Postby date » Wed May 10, 2017 5:50 pm

CintaNotes Developer wrote:BTW did you notice of there's any change of speed regarding if the large note stays in the "found" list, compared when it goes out of it (i.e. doesn't contain the search phrase anymore)?
Also it would be useful to limit the search scope to 'text only' to make sure that it's text matching that is slow.
On the right bottom inside a found note is a square box that displays how many times the phrase searched on occurs in the note, like 1/xx. (Somehow always stays 1 on the left side of the slash?) Somehow it looks like that is the bottleneck, at least for a good part.

When you sort the list in such a way that when your search matches a good number of notes including the very large one, but the large one is further down and not loaded in the 'view' it doesn't seem to impact search performance in terms of speed all too much or at least much less.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Fri May 12, 2017 6:05 am

Interesting. Actually CN counts the number of matches already after the notes list is fetched, without the help of the database (FTS doesn't return number of matches anyway). I can easily imagine this to be slow if the note size is very large.
Alex
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: How to use plaintext?

Postby CintaNotes Developer » Fri May 12, 2017 6:06 am

BTW regarding the first number - for it to increase, focus the note and press F3/shift+F3 to jump between matches.
Alex

Return to “CintaNotes Personal Notes Manager”