Re: The performance of Editplus is much better than notepad,Why?



Read my essay "How big is my program?" Generally, numbers like this cannot be trusted
anyway, and trivial differences like 1.5MB are "in the noise".

Concerns about how many MB of memory you are using are misplaced. Remember, a megabyte is
..1% of a gigabyte, and therefore virtually unnoticeable.

The real issue is why (a) you think a couple megabytes matter and (b) why you think any of
the numbers you are getting are trustworthy.

If you start up a program and look at the program size, this tells you absolutely nothing
interesting about the program. WHat matters is not its size at the start, but how large
it grows while running. Most of the tools available (Task Manager, for example) don't
give you anything vaguely useful most of the time anyway, and cannot be trusted for
serious performance evaluation, particularly of memory footprint.

Code size is irrelevant. You haven't a CLUE as to what those numbers mean (for example,
if it is sharing the 1MB MFC DLL, that 1MB is charged to your app even though it is also
being simultaneously shared with 20 other apps, each of which is ALSO charged 1MB!) Not
to mention the huge USER32.DLL, KERNEL32.DLL and GDI32.DLL footprints which are shared
with EVERY app, or the two dozen or so other DLLs typically loaded by all apps. Code size
of a running program is one of the least interesting metrics that exists today.

My advice: ignore the problem. You are worried about details so infinitesimally
uninteresting as to not be worth the effort. Tens of megabytes of data start to be
interesting. Anything smaller isn't worth wasting effort on.
joe

On 20 Nov 2006 03:03:26 -0800, wei.niu@xxxxxxxxx wrote:

I found editplus's performance is much better than notepad.Editplus
uses only
2--2.5M memory whereas notepad uses more than 4M.Why?

I'm writing a small application managing my diary which costs more than
3M
memory when just opening it wihout opening any diary file,like notepad.

Why editplus costs so less memory?And why notepad costs so much?

As notepad is implemented with the richedit control?And editplus
implemented
with other?
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages