I have an application developed in Delphi 2009 that is giving me some performance nightmares. The application reads data from an excel spreadsheet into a text file and then parses that text file to extract structured information and then writes that information to a business modelling application using COM.
Some of the files are pretty lengthy and can be 7,000 - 10,000 lines long. The analysis and parsing stage works very fast - the problem comes when we add the data to the business modelling application - the import just gets slower and slower until each update is taking over 15 seconds.
However, and this is really weird, if I leave the application running and click and hold the mousr button down with the cursor on any other window - the import speeds up to full speed again. Take your finger off the mouse button and my app slows down again.
Has anyone got any ideas what may be causing this...