Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Performance when you have a lot of spelling errors - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
SW
#1 Posted : Friday, September 9, 2016 7:52:25 AM
Rank: Newbie

Groups: Registered

Joined: 9/8/2016
Posts: 2
Location: Netherlands
Hi,

We have an issue when you have a lot of spelling errors, typing text becomes very slow and the cursor has a delay.
I can reproduce this with a single textbox:

Code:

<Grid>
    <TextBox Name="TextBox1" Width="600" Height="600" AcceptsReturn="True" TextWrapping="Wrap" />       
</Grid>

var spellCheckerAYT = new RapidSpellAsYouType();
spellCheckerAYT.AddTextComponent(TextBox1);



To reproduce:
1. Paste the following text:



Lorem Ipsum is simmply dummmy texxt opf thpe priinting and typpesetting indupstry. Lorpem Ipsum has bepen thpe inpdustry's standpard dummpy tepxt evper sinpce tphe 1p500s, whpen an unknpown prinpter tpok a gpalley opf typpe and scrampbled it to mpake a typpe spepcimen boopk. It phaps spurvived not ponly fipve cpenturies, bput aplso the leapp intpo electrponic typesetpting, repmaining essentially punchanged. Ipt wpas popularised ipn thpe 19p60s wpith thpe replease of Letraset shepets contaipning Lorem Ipsum passapges, anpd mpore recpntly wipth depsktop publisphing sofptware like Aldus PageMaker inclupding verpsions of Lorem Ipsum.

Lorem Ipsum is simmply dummmy texxt opf thpe priinting and typpesetting indupstry. Lorpem Ipsum has bepen thpe inpdustry's standpard dummpy tepxt evper sinpce tphe 1p500s, whpen an unknpown prinpter tpok a gpalley opf typpe and scrampbled it to mpake a typpe spepcimen boopk. It phaps spurvived not ponly fipve cpenturies, bput aplso the leapp intpo electrponic typesetpting, repmaining essentially punchanged. Ipt wpas popularised ipn thpe 19p60s wpith thpe replease of Letraset shepets contaipning Lorem Ipsum passapges, anpd mpore recpntly wipth depsktop publisphing sofptware like Aldus PageMaker inclupding verpsions of Lorem Ipsum.




2. Type some extra text in the textbox, you see this is very slow and the cursor has a delay.


Is there a solution for this issue?
Thanks.
Jim
#2 Posted : Friday, September 9, 2016 4:01:08 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Having a very large number of visible underlines is going to stress the performance somewhat, but please try running without debugging (ctrl-f5) and you should see much better performance.

Best
Jim
-your feedback is helpful to other users, thank you!


SW
#3 Posted : Monday, September 12, 2016 7:19:05 AM
Rank: Newbie

Groups: Registered

Joined: 9/8/2016
Posts: 2
Location: Netherlands
No, there's no difference without debugging.
Jim
#4 Posted : Tuesday, September 13, 2016 5:17:52 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
We're looking for ways to optimize it - I'll get back to you shortly when more info is available, if we can do it, I'll give you a new DLL.
-your feedback is helpful to other users, thank you!


Jim
#5 Posted : Wednesday, September 14, 2016 4:46:59 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Sorry, there's nothing that we can see as an opportunity to optimize. Essentially it comes down to the fact that for every key press our Adorners must repaint themselves and to do that they need to call TextBox.GetRectFromCharacterIndex which is fairly slow. We've experimented with caching this data which helps under certain conditions, but still makes no difference if the user types and causes the text to reflow.

All I can suggest is disabling as you type checking if the number of errors gets too high.
-your feedback is helpful to other users, thank you!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.