[fpc-devel] Definition of the time-fration in a TDateTime before 30/12/1899

Jonas Maebe jonas.maebe at elis.ugent.be
Tue May 23 13:30:27 CEST 2006


On 23 mei 2006, at 12:27, Graeme Geldenhuys wrote:

> Yes much faster!  I just finished a case in point on our code.  One of
> our developers (new to unit testing) used the Setup and TearDown
> methods in a TestSuite to setup a db connection, do a test and close
> the connection. Over and over and over.  The 27 tests took over
> 30seconds to execute.
>
> I relocated the db connection code to a test decorator (part of
> fpcUnit and took 15 lines of code to implement) and now it creates a
> single connection for the lifetime of all tests in that TestSuite.
> Time to run those 27 test are now 1.9 seconds!
>
> I can't see how something like this is possible with the way the fpc
> team does testing.

Our output is simply redirected to a file. This file is later parsed  
and committed to the database in one go using another program (well,  
actually it's uploaded to www.freepascal.org, where a program does  
this parsing and committing).

The main cause of slowness when running the fpc test suite is the  
thousands of compiler, assembler, linker and test program invocations  
(assembler and linker only on platforms without an internal assembler  
and/or linker, obviously).


Jonas



More information about the fpc-devel mailing list