Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: "new LimeReport" takes 30~40 seconds!  (Read 145 times)

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
"new LimeReport" takes 30~40 seconds!
« on: April 02, 2021, 10:00:53 AM »
Hi, all:

I have a performance issue while calling "new LimeReport" in the ui thread. This new process takes too much time thus the whole ui freezes for about 30~40 seconds for the first-time run!(the second time it runs much faster due to memory cache I guess).

We tried running "new LimeReport" in a seperate thread sucessfully but, the app crashed once we triggered the report designer(via signal-slot mechanism because LimeReport is running in a seperate thread).

I am wondering if "new LimeReport" can be run in a seperate thread? If not, can we speed up the LimeReport initialization process?

Thanks,
Alex

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 905
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #1 on: April 02, 2021, 10:03:54 PM »
Hi!
Could you explain the issue in more detail? Which OS, compiler, limreport and Qt version do you use?
I have checked the next code:
Code: [Select]
    QTime start = QTime::currentTime();
    report = new LimeReport::ReportEngine(this);
    qDebug() << start.msecsTo(QTime::currentTime());
in my demo_r1 sample project and got 528 msec in debug mode and 268 in the release.   

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #2 on: April 06, 2021, 06:41:18 AM »
Hi, Arin:

This is my environment: Win10 64-bit, LimeReport v1.5.35, Qt-5.12.7, Mingw 7.3.0 64-bit, 8GB Ram, i5 6500 quad core cpu.

On some low-end machines, the consructor could even take more than one minute! It seems to me the constructor takes lots of time to copy data from harddisk to memory.

Thanks,
Alex


« Last Edit: April 06, 2021, 07:34:43 AM by alexyuisme »

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #3 on: April 06, 2021, 10:32:38 AM »
Hi!
Could you explain the issue in more detail? Which OS, compiler, limreport and Qt version do you use?
I have checked the next code:
Code: [Select]
    QTime start = QTime::currentTime();
    report = new LimeReport::ReportEngine(this);
    qDebug() << start.msecsTo(QTime::currentTime());
in my demo_r1 sample project and got 528 msec in debug mode and 268 in the release.   

After some hackings, I found one possible way to speed up the init process: just kick off "report = new LimeReport::ReportEngine(this)" before main ui gets initialized. I am not sure why that works but if I put the new statement after ui initialized(like I did before), the new process is bloody slow.

Note: my ui is way more complcated than those in demo1 and demo2.

Thanks,
Alex


Subst

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #4 on: April 06, 2021, 11:20:39 AM »
Hi!
Can we see your code of the class where LR instance is created?
(.h & .cpp)

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #5 on: April 07, 2021, 10:57:06 AM »
 :-\That's my bad...After restart my machine the problem remains. Is there anyone experiencing the same slow new process?

Alex

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #6 on: April 08, 2021, 09:09:46 AM »
My source code: https://github.com/alexyuisme/test_limereport.

I copied this compiled exe into different environment which contains different number of dlls and the launch time varies.(from a few seconds to more than one minutes) Is it caused by dll look-ups?

I did the same thing by copying the demo program "LRDemo_r1.exe" to different environments(with different dlls), and the launch time varies the same.

Note: limereport.dll and QtZint.dll exist in the same directory as the executable for all environments.

Any ideas?

Thanks,
Alex
« Last Edit: April 08, 2021, 10:25:02 AM by alexyuisme »

Subst

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #7 on: April 08, 2021, 10:11:55 AM »
Your test project works fine. Creating of report instance takes less then half second.

>> I copied this compiled exe into different environments which contains different dlls and the launch time varies. Is it caused by dll look-ups?

Is the same problem when you're lunch the program from build environment?
What version of LR you uses?
What version of QT?
May be QT version you are used when build LR and QT version in another environment are different?
What in PATH variable of "differsnt environment"?

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #8 on: April 08, 2021, 11:03:04 AM »
My answers:

Is the same problem when you're launch the program from build environment?

-> No, the launch speed under Qt Creator is ok. Launch speed after deployment is not ok (the launch time varies from a few seconds to more than one minutes, depending on different environments that contain different dlls.)

What version of LR you uses?
What version of QT?

-> This is my environment: Win10 64-bit, LimeReport v1.5.35, Qt-5.12.7, Mingw 7.3.0 64-bit, 8GB Ram, i5 6500 quad core cpu.

May be QT version you are used when build LR and QT version in another environment are different?

-> All environments are built with the same version of QT toolchains as listed above.

What in PATH variable of "differsnt environment"?

-> All environments use the same PATH variable which doesn't contain the paths of limereport.dll and QtZint.dll.
the executable, limereport.dll and QtZint.dll are located in the same directory for all environments.

Thanks,
Alex

Subst

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #9 on: April 08, 2021, 12:10:24 PM »
>> All environments use the same PATH variable which doesn't contain the paths of limereport.dll and QtZint.dll.
the executable, limereport.dll and QtZint.dll are located in the same directory for all environments.

please type from CMD echo %PATH% copy from & past here result

and second, please make screenshort of folder where located .exe, limereport.dll and so

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #10 on: April 08, 2021, 12:46:05 PM »
1. please type from CMD echo %PATH% copy from & past here result

C:\Users\Administrator>echo %PATH%
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\libnvvp;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\libnvvp;C:\Program Files\DahuaTech\MV Viewer\Runtime\x64\;C:\Program Files\DahuaTech\MV Viewer\Runtime\Win32\;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\Program Files\PuTTY\;D:\Program Files\TortoiseGit\bin;D:\Program Files\Git\cmd;D:\Qt\Qt5.12.4\Tools\mingw730_64\bin;D:\Qt\Qt5.12.4\5.12.4\mingw73_64\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;D:\Program Files\nodejs\;D:\sqlite;D:\boost_1_70_0\tools\build\src\engine\bin.ntx86_64;D:\Program Files\Java\jdk1.8.0_221\bin;D:\Program Files\CMake\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\Administrator\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Lib;D:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;D:\Go\bin;D:\Flutter\bin;C:\Program Files\TortoiseHg\;C:\Windows\SysWOW64\5097;C:\Windows\SysWOW64\5097;C:\Windows\SysWOW64;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;D:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\go\bin;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts;c:\Program Files\MySQL\MySQL Server 8.0\bin;C:\ninja;C:\Users\Administrator\.dotnet\tools

C:\Users\Administrator>

2. Please see the attachments.

Let me know if any more info is needed.

Thanks,
Alex

Subst

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #11 on: April 08, 2021, 02:56:55 PM »
look the version of Qt5Core or other lib in these folders

Subst

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #12 on: April 08, 2021, 03:01:03 PM »
and
where QT has installed?
what folder?

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #13 on: April 08, 2021, 03:57:28 PM »
My Qt's install path: D:\Qt\Qt5.12.4\

alexyuisme

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: "new LimeReport" takes 30~40 seconds!
« Reply #14 on: April 08, 2021, 04:09:33 PM »
I noticed some environments have dlls: libGLESv2.dll and libEGL.dll but some environments don't have those two files. Are those two dlls necessary?

Thanks,
Alex