Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAR build in VSCode is slower than in IAR Workbench #42

Closed
LucaGotti opened this issue Mar 20, 2023 · 6 comments
Closed

IAR build in VSCode is slower than in IAR Workbench #42

LucaGotti opened this issue Mar 20, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@LucaGotti
Copy link

It's at least two times longer !

@jlonnberg
Copy link
Collaborator

@LucaGotti So there are some differences in how a project is built, but the time you're suggesting sounds like there is some sort of problem. Which version of the workbench are you using and what does your project structure look like, e.g., how many files, how many configurations, pre/post-builds etc?

@jlonnberg jlonnberg self-assigned this Mar 23, 2023
@jlonnberg jlonnberg added the bug Something isn't working label Mar 23, 2023
@LucaGotti
Copy link
Author

@jlonnberg :
yes my project is quite large , it is made by 632 files. It's a project based on NXP SDK for an IMR-RT MCU with display, gui , frertos, FAT file system, wifi , LAN and TCP/IP stack ..
IDE Is EW arm 9.30.1, see below pic ..

Immagine 2023-03-23 091428

@jlonnberg
Copy link
Collaborator

So to explain the difference between the workbench and the vscode plugins; the workbench is able to keep the entire project in memory which means that building does not require any load action on the project. The vscode plugins uses iarbuild, which is a standalone CI utility for building projects. Consequently, building in vscode requires iarbuild to load the project which most likely causes the overhead that you're seeing.

I'll investigate if we can improve this.

A WA that might be applicable here is to run iarbuild with the "-ninja" option on your project which will enable you to build with ninja directly instead which will remove the overhead. Note that the ninja file is stale, so if you change any options or add/remove any files, you'll need to regenerate the ninja file.

@LucaGotti
Copy link
Author

@jlonnberg
Just to clarify, the -ninja option has to be added in vscode ?
could u briefly guide us on how to do that ?

@jlonnberg
Copy link
Collaborator

There is not specific action for it, so you'll need to manually run "iarbuild [proj-name] -ninja [configuration]" to generate the ninja file. You can also define it as a custom task, https://code.visualstudio.com/docs/editor/tasks#_custom-tasks, to make generation a bit easier. To build, simply navigate to the configuration directory and run "ninja"

@LucaGotti
Copy link
Author

@jlonnberg : just as a reference, after having generated the ninja file, in vscode a complete rebuild takes roughly the same as workbench : both now takes about 6 minutes .
Many thanks for the useful hint !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants