Solved

Performance of rich edit control vs. regular edit control

Posted on 2001-06-26
3
160 Views
Last Modified: 2013-11-20
The rich edit control will drive me to the poorhouse :-)

I have a test program that bombards another program with commands.  The details are not really important.  The test program has an output window, created with a rich edit control, so that it can easily show stimuli, responses, error conditions, etc. in different colors and to avoid the text-length limitation of a lower-middle-class edit control.

When the test program talks to the other program, it achieves somewhat above 60 commands/second and uses 2% of my desktop's CPU time.

When it narrates its activity (commands, queries, query responses) to the rich edit window, it achieves 20 commands/second and uses 70% of the CPU time.

Three-part question

Are you surprised?  I was.

Do you know of any rich-edit-control tricks that I should be using?

Can you think of any existing output-only scrolling text windows capable of multiple colors, or write my own for this application?

Thanks in advanced for any help

Dave
0
Comment
Question by:davidlap
3 Comments
 
LVL 9

Expert Comment

by:Pacman
ID: 6230753
How do you append the new lines to your richedit control?
Can you post the code snippet?
0
 
LVL 7

Accepted Solution

by:
peterchen092700 earned 50 total points
ID: 6232339
a) Not really. I never liked the RichEdit bastard ;)
   looking at wordpad, I guess the performance is as it is

b) I guess you already use SetSel to position the cursor at the text end, and then call ReplaceSel to add your text. Another option would be using the StreamIn/StreamOut, but I doubt it's much faster

c) IE window, adding HTML. But might be isn't any better

Anyway, Code would be nice:

1) How do you send the data beetween the programs (maybe this is the bottleneck)

2) how do you append the data


Peter


0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9490134
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by : peterchen

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need Help INsttalling wget on Mavericks OS X 3 90
WinWaitActive parameters 12 31
zeroFront challenge 7 80
FizzBuzz challenge 9 76
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now