c - Cost/benefit of multi-threaded text processing -


I am working on real-time syntax highlighter for the iPhone and I have created a custom UIView that takes the string,

Pars it and then it is inserted into its drawRect: method. I have also applied a blinking cursor. However, it is starting at a slow speed and I think that when I apply multi-line processing and chuck processing it will slow it down. However, I tried to keep [formattedTextView setNeedsDisplayInRect:] Calling in a function in my view controller and then calling on a different thread using [self performSelectorInBackground: @selector (updateDisplay) withObject : Zero] . The keyboard is now more responsive, but it seems like a bad use of thread on a single-core processor.

Is there any problem with doing something like this?

Thanks

As you told yourself, a multi processor multi Will not bring a huge display on threading to promote, but will come along. Sentence of a stability and complexity

On-the-fly syntax-color is a difficult problem, is optimized for possibilites with stuffed:

  • You can regexes on one Are the whole text of the group application? (Bad) or can you keep the text in a skilled data structure such as AST?
  • Are you limiting colorful painting to visible areas?

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -