I am using "qtdeploy test". I think "qtdeploy build" is not a big problem because it is only used when I want to release. But "qtdeploy test" is used all the time when developing. "qtdeploy -fast test" took me about 60 seconds when testing the sample "qt\internal\examples\uitools\calculator". I am wondering if it can be optimized.
2.Could I custom build modules? For example, I just want to write an application based on qt widgets. Then I just want to build core, gui, widget. If only build these three modules, could it speed up "qtdeploy test"?
Calculator example runs in about 33s with qtdeploy test desktop on my laptop (Arch Linux, i7, Qt5.10.1). Following that, with -fast flag it runs at about 8s. Having said that, if you'd be careful with your resources (not using qml:/ directive), you can actually run your application with go run main.go, which is handy, and I've noticed it was a bit faster in some cases. There is another option: qtrcc && go build && ./calculator, which I think manually invokes qtdeploy internals (not sure, but it looks like it).
Regarding the send point, it is an excellent idea and it's already been discussed. I encourage you to give it a thumbs up.
On a second thought, maybe the author would create a new wiki page and point out the steps needed to refactor this beauty. A call graph also helps, and there needs to be a lot of tests to make sure it doesn't break. I'm not saying it's easy, but it's worth it big time.
I'm all up for it, I can manage some spare time decomposing the codes. @therecipe what do you reckon?
Thanks for your reply.
My PC is win10 and i5, Qt 5.10.1. I try the calculator sample and add some test code to qtdeploy to print the time. I start the test in a clean folder and do not clean any generated files during the tests.
about 110s
about 75s
about 5s
about 70s
most time is occupied by "go build" command
Well, that makes sense as the go tool in this library is calling cgo.
@ismlsmile
these three files will be updated everytime. Is it normal? As I known, when a package is installed, if the source code of the library is not changed, this file will not be updated.
Yes, this is because qtdeploy calls qtminimal to generate a subset of the binding based on you project's code, to make the finally binary size smaller. (This newly generated code will be then be needed to be compiled again.)
2.Could I custom build modules? For example, I just want to write an application based on qt widgets. Then I just want to build core, gui, widget. If only build these three modules, could it speed up "qtdeploy test"?
Sorry, I'm not sure what you mean exactly.
When you just import "core", "gui", "widgets" then qtdeploy should only generate/build/compile these three modules. (Or do you mean during the installation while running qtsetup? Because the unused modules shouldn't impact the qtdeploy build time at all.)
@arsham
On a second thought, maybe the author would create a new wiki page and point out the steps needed to refactor this beauty. A call graph also helps, and there needs to be a lot of tests to make sure it doesn't break. I'm not saying it's easy, but it's worth it big time.
I'm all up for it, I can manage some spare time decomposing the codes. @therecipe what do you reckon?
Yeah, I'm planning to make the generator code more accessible and start to document the internals.
But at the moment I'm more focused on the outer shell (creating best practice examples, updating the general documentation of the tooling + how to deploy your applications, and a lot of other totally undocumented stuff like how to directly make use of the docker files or how to make use of vagrant.)
Then fix the stuff necessary for Qt 5.11, after that move + re-brand the repo in the beginning of june.
And then I planned to start documenting the internals and write proper tests, so that the code can be easily refactored with the goal to cut down the time needed to compile the generated glue code (+ solve some binary size issues related to qtmoc).
I have similar (experience, I am new to both QT and golang QT binding;
using a thinkpad laptop with (i5-6400U CPU, 24G mem and SSD), windows 10
first time , it took about 7 minutes to run "qtdeploy -fast test" therecipe/example/basic/widgets; after that I changed one line of code in main.go, 2nd time it took around 1 minute;
but still, one minute is too long for such simple example, is there anyway to make it faster ?
Most helpful comment
@ismlsmile
Yes, this is because qtdeploy calls qtminimal to generate a subset of the binding based on you project's code, to make the finally binary size smaller. (This newly generated code will be then be needed to be compiled again.)
Sorry, I'm not sure what you mean exactly.
When you just import "core", "gui", "widgets" then qtdeploy should only generate/build/compile these three modules. (Or do you mean during the installation while running
qtsetup? Because the unused modules shouldn't impact theqtdeploybuild time at all.)@arsham
Yeah, I'm planning to make the generator code more accessible and start to document the internals.
But at the moment I'm more focused on the outer shell (creating best practice examples, updating the general documentation of the tooling + how to deploy your applications, and a lot of other totally undocumented stuff like how to directly make use of the docker files or how to make use of vagrant.)
Then fix the stuff necessary for Qt 5.11, after that move + re-brand the repo in the beginning of june.
And then I planned to start documenting the internals and write proper tests, so that the code can be easily refactored with the goal to cut down the time needed to compile the generated glue code (+ solve some binary size issues related to qtmoc).