Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1093361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:48:55+00:00 2026-05-16T23:48:55+00:00

WPF’s RTB is terribly slow when working with any realistic amount of text. And

  • 0

WPF’s RTB is terribly slow when working with any realistic amount of text. And by realistic amount, I mean what you’d expect any text editor to be able to handle (100kb? At least) without showing any signs of slowness.

This expected RTB behavior is not the case for me. Actually, the control works pretty much like it should when text is neatly separated into small words and small paragraphs and I implement some mechanism that will zap my users’ whenever they get brave and type anything considerably long. I haven’t found a way to implement said mechanism yet, so instead I’m forced to (or at least attempt to) solve the problem.

I find this deeply disturbing because it makes no real sense to me. If you’re a daredevil and happen to type out one long string of characters without a space or break, you fall victim to a locked window for several seconds, making typing an unwelcome test of patience. What I’m anxious to know is: why is that? Specifically, why does it slow down more and more and only when text isn’t spaced consistently? Am I insane to consider the case that someone using my program will have a broken space bar and will thus be more inclined to notice this incredible slowdown? Text selection is also gravely affected in this contiguous-string case.

I’m targeting .NET 4.0, using VS 2010, and no events are hooked on the RTB; for testing purposes it’s nothing but a RTB (< RichTextBox />) on an empty window. What can I do to improve its performance? Is it more realistic to just write my own control for this, keeping the feature set to my minimum requirements? If so, any links to resources would be greatly appreciated.

It’s worth noting that the amount of data in the RichTextBox can be really small; what I was trying to make clear was that it’s the format of the text that really had the biggest impact on performance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:48:56+00:00Added an answer on May 16, 2026 at 11:48 pm

    This is not an unusual problem for new implementations of text boxes. It has to do with the algorithm used for calculating line breaks. Based on the kind of behaviour you’re reporting, it sounds like the efficiency of the algorithm they use is strongly dependent on the length or words (i.e. it might be, say, O(n^2) with respect to the length of words). You should report this directly to Microsoft (with a clear example) so that they can fix the bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

WPF is great in that I should be able to use {StaticResource MyBackground} instead
My WPF application has a number of buttons on its main window. I'm working
My wpf application was running very slow. I was using the performance profiling tools
In WPF I need to Add/Delete/Update any chosen table’s data in SQL server 2008
WPF validation system performs intial validatation of an object (I mean - all fields
WPF: How do I prevent users from entering text in a Textbox data bound
WPF uses the system highlight color for painting the background of the selected text.
WPF ListBoxItem how to wrap text in it? My Item container style looks like
WPF provides a very convenient way to handle unexpected exceptions: I can just attach
WPF's ItemsControl will display a focus rectangle when it thinks it has focus and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.