Recent

Author Topic: Long as the program runs on another computer:(((  (Read 7912 times)

abmservice

  • Jr. Member
  • **
  • Posts: 69
Long as the program runs on another computer:(((
« on: March 13, 2010, 03:52:58 pm »
I wrote a program using Lazarus. Program on the computer where Lazarus runs very quickly. How do I move to another computer that run lasts from 15-20 seconds. Why?
Compiled in Vista. Run in XP. Checked by compiling in XP, is the same: (
« Last Edit: March 13, 2010, 04:26:07 pm by abmservice »

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Long as the program runs on another computer:(((
« Reply #1 on: March 13, 2010, 09:08:40 pm »
I am not sure I understand your question.
You wrote a program on Vista and compiled it there. On Vista it works fine, but on XP its slower???
Am I understanding correctly???
Tell me, do both machine have the same amount of RAM memory?
Do both machine have the same (or equivalent speed)? Processor speed?

abmservice

  • Jr. Member
  • **
  • Posts: 69
Re: Long as the program runs on another computer:(((
« Reply #2 on: March 15, 2010, 06:55:22 pm »
Lazarus 0.9.29 -VISTA 32 -4GB RAM -CORE2DUO 2x2GB-Program -OK
Lazarus 0.9.29 XP 32 -512MB RAM -Pentium 1,4 GB - Program -OK
XP 32 2GB RAM -CORE2DUO - Program - Long run -20 seconds:((((

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
Re: Long as the program runs on another computer:(((
« Reply #3 on: March 15, 2010, 09:49:11 pm »
What does your program do ? graphics ? file I/O ? etc.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

abmservice

  • Jr. Member
  • **
  • Posts: 69
Re: Long as the program runs on another computer:(((
« Reply #4 on: March 17, 2010, 02:54:45 pm »
Database -firebird 2.1 Program to use the bakery and confectionery

Wodzu

  • Full Member
  • ***
  • Posts: 171
Re: Long as the program runs on another computer:(((
« Reply #5 on: March 18, 2010, 08:34:10 am »
What part of the program runs slowly?

Do you mean query execution time or maybe connecting to the database?

I would suggest you to create a simple, very very simple test program so you could easier check where is the problem.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Long as the program runs on another computer:(((
« Reply #6 on: March 18, 2010, 11:23:00 am »
Lazarus 0.9.29 -VISTA 32 -4GB RAM -CORE2DUO 2x2GB-Program -OK
Lazarus 0.9.29 XP 32 -512MB RAM -Pentium 1,4 GB - Program -OK
XP 32 2GB RAM -CORE2DUO - Program - Long run -20 seconds:((((

Are you certain that the "slower" machine does not have too many active processes in memory at the time when you are running your program? For example, real-time virus scans, disk defragmenting etc.

I also use Lazarus applications with backend Firebird databases on Windows 2000 Professional, XP & Vista & I've never noticed the problem you are talking about.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9874
  • Debugger - SynEdit - and more
    • wiki
Re: Long as the program runs on another computer:(((
« Reply #7 on: March 18, 2010, 12:58:49 pm »
put some time measurement into your code. Best is to compile your app with a console (open menu "project"/"compiler options" => go to the linker tab, and uncheck "Win 32 GUI application" (-WG)" / newer lazarus has this under "project options" )

Then you can writeln before and after you call the database, or before and after you do other things => and you can observe where your code slows down.

Also are all 3 computer use the exact same database? (same amount of entries; same indexes? a missing index can easily account for great time losses) Are the databases all on the same PC as the program (local) or are they connected over network?

abmservice

  • Jr. Member
  • **
  • Posts: 69
Re: Long as the program runs on another computer:(((
« Reply #8 on: March 18, 2010, 02:17:50 pm »
I tested locally and the database server on linux. I suspect that the fault may be Windows XP. Today I installed xp on a new computer and working properly, the same programs installed on your computer as the problem and working properly despite the fact that the processor is AMD Duron 1.2 GHz RAM 256MB.
Thank you for suggestions. I did not installed any library that is installed by default with Lazarus.

 

TinyPortal © 2005-2018