[Lazarus] Prevent focus losing

Valdas Jankūnas skroblas at erdves.lt
Sun Aug 24 20:35:07 CEST 2008


Hi Fpc/Lazarus users,

This memory measurements are biased.

Most of the memory usage in your application is not the application itself, is about the system libraries that are loaded. For instance, at the moment he point the memory usage of 28 M for a MessageBox, was the moment when the entire application was loaded, was loaded yet DLLs for processing XMLs (via System.XML .NET namespace) and Windows.Forms code. Take from yourself and run the tests. In normal case, at the same tasks, .NET should have an overhead (test by yourself) as calling system libraries.

In my default application launch (remember this is about a pre-alpha/preview release) there is: 8 M memory usage (Vista 32 bits, not 64, if someone as Florian sow that the application requires more RAM in 64 bit .NET runtime against 32 bit Lazarus) against 10M that has Lazarus. 

The single issue that I wanted to point it out is that: if you take a console application in .NET (which mainly loads only kernel32.dll  and mscorlib.dll - the VM of the .NET on Windows) the usage will be much lower yet similar with a FPC one (a bit more cause of mscorlib.dll). If you take that memory is not freed at once (excluding if you program using IDisposable) because of GC, in a well crafted benchmark, always will make a .NET application to use more than a Lazarus one.

But, if you consider that .NET 3.0 (Pasic requires 2.0) is a part of Windows VIsta, Mono is a part of two major distros (Ubuntu as a part of GNOME, and Suse that are teamed with Novell team that makes Mono), you may consider that distributing a .NET application is not such a big issue and there is not a requirement for download.

Considering that .NET/Mono gives to you not experiental generics, offers to you all that FreePascal have as runtime, but in some respects even more, it makes a better choice for an IDE to use it. 

So, do it by yourself. Anyway, the scope of the today preview was to show how it will be about and you are very welcome to feedback any oppinions. One last issue, if you wil look in code, that many dialogs are kept in RAM, only for one reason, is faster a Show than to create a dialog from scratch. For a devel machine that is not an issue.

If you consider that have memory leaks or it use too many memory, please fill a bug report and give a real feedback (which files gives to you that usage!?), not creating FUD against something that is not Lazarus. Regarding the dialog that is used to render text, is the default TextEdit dialog that offers .NET. There was an initial try to use SharpDevelop Syntax Highlighter (similar with SynEdit) but it does not work on Linux, so for now is deffered until will be fixed to work on Linux or another highligher will be implemented.

Thank you again for your feedback,
The PasicIde team

 Search for all things and keep only what is good.



----- Original Message ----
From: Joost van der Sluis <joost at cnoc.nl>
To: General mailing list <lazarus at lazarus.freepascal.org>
Sent: Sunday, August 24, 2008 5:26:07 PM
Subject: Re: [Lazarus] Pasic Ide - previously named Lightsarus

Op zondag 24-08-2008 om 08:10 uur [tijdzone -0700], schreef Ciprian
Mustiata:
> Thank you Florian for your bug report.
> 
> Right now should launch or at least to display a better error in a Message Box. Is fixed and uploaded the fix.

Did you also fix the memmory-issue? Which was the most important
complaint? 28MB for just one error-message is a bit of a problem, no?
For a project that is designed to create small programs?

Joost

_______________________________________________
Lazarus mailing list
Lazarus at lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus



      



More information about the Lazarus mailing list