[Lazarus] Performance of GTK 2 and CE

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Fri Nov 7 10:00:56 CET 2008


Felipe Monteiro de Carvalho wrote:
> On Thu, Nov 6, 2008 at 8:04 AM, Mark Morgan Lloyd
> <markMLl.lazarus at telemetry.co.uk> wrote:
>> Somebody I know started experimenting with Lazarus for CE a few days ago
>> but finds the performance unacceptable- vastly slower than C#. Is this
>> likely to be caused by debugging code, and again can this be disabled-
>> preferably without having to recompile the IDE?
> 
> With CE I suppose you mean Windows CE?
> 
> Performance is a very generic term. Performance of what? Non-visual
> code? Graphics drawing?
> 
> I will suppose it is graphics drawing. No, I doubt that the debug
> information causes this. I have noticed the graphics speed do is much
> slower then in a desktop (I don't use .NET, so can't comment there),
> but I never researched to find the reason why.
> 
> Also, without a benchmark, your assertion is empty. Which Lazarus code
> is slower then which C# code? Are they really equivalent?

This is on behalf of Andy Lawrie who is having problems connecting to 
the list at present. Apologies if I've done anything that screws the 
formatting.


It was myself who experienced the speed problems. I tried to post them 4 
or 5 times but the mailing list rejects my emails - I will try this once 
more.

As a test project I have been porting a WinCE (ARM) application I first 
wrote using C#. It's for PocketPC.

The C# version was compact but sluggish in operation, so I rewrote it in 
old fashioned vanilla C, directly to the WinCE API. This also produced a 
compact executable, and the execution speed was excellent. The downside 
is that development is painfully longwinded. While the C version of the 
app works just fine, I will at some point want to extend it, and Lazarus 
looks to be a far better development environment. And indeed, it is. 
I've been very impressed with it.

Most development was using the emulator, but when I copied it over to 
the PDA for the first time I was shocked by the performance. It's about 
10 times slower than the C# version, which already was too slow. I knew 
the executables were going to be large, and accept that as a penalty for 
the very much easier development. But I hadn't considered that execution 
speed might be an issue.

All it is doing is drawing some standard edit boxes and buttons on the 
screen. The PDA I tried it on is an XDA Stellar.

Optimisation is on Level 1 and there are no checks enabled.

Is it possible I have just got some settings wrong somewhere, or is this 
speed to be expected?

pp Rgds, Andy



More information about the Lazarus mailing list