Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Wrong spell checker on russian (and probably other languages)

<< < (6/10) > >>

BlueHazzard:

--- Quote ---What do you mean by this?
--- End quote ---
That we do not have to spell check 10000 words, because we spell check only comments and strings (not the majority of the file). Anyway This patch should speed up things to quite some extend (if the scintilla message queue is the slow down part).


--- Quote ---They feel rather sluggish.
--- End quote ---
The scrolling or the loading? The scrolling should not be influenced by the spell checker on codeblocks side (on scintilla side, aka coloring i do not know) because we parse only on loading and then only the modified part of the file.

If i find time i will try to make some measurements. Beside this, any other comments on the code? Can i commit it?

oBFusCATed:

--- Quote from: BlueHazzard on October 23, 2019, 09:51:05 am ---That we do not have to spell check 10000 words, because we spell check only comments and strings (not the majority of the file).

--- End quote ---
Your metric is off. Simple guess 10 words a line, 10kloc file, 10% comments - you have 10k words.


--- Quote from: BlueHazzard on October 23, 2019, 09:51:05 am ---The scrolling or the loading?

--- End quote ---
Loading is really bad. I've not profiled to see what is going on. There is known bug that loading files with many functions is rather slow, because the creation of the CC combobox in the toolbar is rather slow. Probably it is this one, but only profiling will tell.

My comment is a general comment about performance and C::B.

oBFusCATed:

--- Quote from: BlueHazzard on October 23, 2019, 09:51:05 am ---Beside this, any other comments on the code? Can i commit it?

--- End quote ---
I guess, I'll have to test it to have an opinion.

oBFusCATed:
1. Why is this needed?

--- Code: ---if ( !stc->IsRangeWord(wordstart, wordend) )

--- End code ---
Remove or add a comment!

2. Also why do you call WordEndPosition with a pos argument and not with a wordstart argument?
3. The first change in the patch looks strange. Add a comment why it is needed? Why is there a start-- operation before it?

BlueHazzard:
I am always astonished how your reviews improve the code... Thank you for that.
Here is a second revised patch


--- Quote ---Also why do you call WordEndPosition with a pos argument and not with a wordstart argument?
--- End quote ---
The idea was, that the search word end function does not have to start from the beginning of the word to search for the end (performance) but on a second thought this probably can also backfire...
Using startword is probably saver...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version