Open MortezaAghazamani opened 2 months ago
I think it not a problem now, full time complation for all samples (230 items) take 75ms, Imgui has compite time much more about 600ms. If sometime it will be more than 200ms can do something, but really it need to have about 700 spinners in library
System specifications: Intel i7-8650U @1.90GHz Visual studio 2022, C++17, x64 release, optimization -O2 ImGui static lib compiled by VCPKG.
I did not include this part of report as they are quite similar in all my tests. 1> 0 ms ConvertToAbsolutePath 1 calls 1> 0 ms SetEnv 9 calls 1> 0 ms Delete 6 calls 1> 0 ms RemoveDuplicates 3 calls 1> 0 ms MakeDir 12 calls 1> 0 ms AssignProjectConfiguration 1 calls 1> 0 ms MSBuild 1 calls 1> 0 ms CheckVCToolsetVersion 1 calls 1> 0 ms Touch 2 calls 1> 0 ms GetOutOfDateItems 3 calls 1> 0 ms GenerateDesktopDeployRecipe 1 calls 1> 0 ms AssignCulture 1 calls 1> 1 ms FindUnderPath 7 calls 1> 1 ms WriteLinesToFile 3 calls 1> 1 ms ReadLinesFromFile 4 calls 1> 1 ms CallTarget 2 calls 1> 2 ms Message 8 calls 1> 2 ms CppClean 1 calls 1> 2 ms AssignTargetPath 7 calls
#include <imgui.h> void main() { ImGui::Begin(""); }
${\color{red}116 ms}$ CL 1 calls 326 ms Link 1 calls 360 ms Exec 2 calls
#include <imgui.h> #include "imspinner.h" void main() { ImGui::Begin(""); ImSpinner::SpinnerArcFade("test", 1.f, 1.f); }
350 ms Link 1 calls 362 ms Exec 2 calls ${\color{red}895 ms}$ CL 1 calls
#include <imgui.h> #include "imspinner.h" #include "a.h" #include "b.h" void main() { ImGui::Begin(""); ImSpinner::SpinnerArcFade("test", 1.f, 1.f); testA(); testB(); }
1> 355 ms Exec 2 calls 1> 368 ms Link 1 calls 1> ${\color{red}2470 ms}$ CL 1 calls
a.h: (b files are Same as a files, only the function name is different)
#pragma once
void testA();
a.cpp:
#include "a.h"
#include <imgui.h>
#include "imspinner.h"
void testA()
{
ImGui::Begin("");
ImSpinner::SpinnerArcFade("test", 1.f, 1.f);
}
I only had to compile ImGui once and I could use it multiple times without needing to make any changes inside the library. Therefore, I didn't track the compile time for ImGui. I was hoping for the same efficiency with imspinner, but that wasn't the case. This is because when using a header-only library, the compiler has to recompile every file that uses it if I make any changes in that file.
The compilation time on my system has increased significantly. However having a powerful system reduces the compilation time, but optimizing for both time and power efficiency is valuable.
It strange, will look why it happens. But you also can suggest a solution if found to faster then me
Hello,
Thank you for creating such fantastic art with the spinners. They are really nice and useful.
I have a question. As the size of the library grows, the compilation time also increases. Are there any plans to make it a compiled library instead of a header-only library?