Building our Qt app in VSCode is very slow

Hi there,

It takes a couple of minutes to complete the building process of our app when using QT Creator. However, the building process takes around one hour when we use VSCode to get a container that includes the app. There must be something we can do to speed this up. Any advise is welcome.

Kind regards,

V

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help! Could you let me know which OS and version you are using? Also, to provide the most accurate guidance for optimizing your Qt build process, please run the tdx-info command on your device to get detailed information about your hardware setup. You can find more details about this command at Getting Device Information with Tdx-Info | Toradex Developer Center

This will help me understand your specific platform (SoM, carrier board, OS version) and provide targeted optimization recommendations for your Qt containerized application build process.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Software summary

Bootloader: U-Boot

Kernel version: 6.6.119-7.5.0-ge5c5595adb06 #1-Torizon SMP PREEMPT Mon Jan 5 09:23:13 UTC 2026
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/903bd7d0cab87c59319339c6243cebb82b41caf8ed06f0fffac5019a37afca5a/0 galcore.powerManagement=0 galcore.showArgs=1 galcore.gpuProfiler=1 pd_ignore_unused
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.5.0-build.30
Distro variant: VARIANT=“Docker”
Hostname: colibri-imx8x-06996015

Hardware info

HW model: Toradex Colibri iMX8QXP on Colibri Evaluation Board V3

Toradex version: 0038 V1.0D
Serial number: 06996015
Processor arch: aarch64

Thank you for providing the detailed system information! I can see you’re running Torizon OS 7.5.0 on a Colibri iMX8QXP with the Colibri Evaluation Board V3. The significant difference in build times between Qt Creator (minutes) and VS Code (one hour) for containerized applications is a common issue.

Understanding the Build Process Differences

For Torizon OS development, there are different approaches for Qt applications(1):

  1. Qt Creator with cross-compilation - builds directly for the target without containerization
  2. VS Code with Torizon IDE Extension - builds containerized applications using Docker

The containerized approach takes longer because it involves building the entire container image, including all dependencies and the Qt framework itself(1).

Optimization Strategies for Container Builds

1. Use Multi-Stage Docker Builds

Structure your Dockerfile to separate the build environment from the runtime environment, reducing the final image size and build time.

2. Leverage Docker Layer Caching

Ensure your Dockerfile is structured so that frequently changing code comes after stable dependencies. This allows Docker to reuse cached layers.

3. Pre-built Qt Containers

Consider using Toradex’s pre-built Qt containers as base images. Torizon OS provides Debian-based container images with Qt support(1). These containers include:

  • Qt libraries pre-installed
  • Proper hardware acceleration support
  • Optimized for Toradex modules

4. TorizonCore Builder for Pre-provisioning

You can use TorizonCore Builder to pre-provision your container into the OS image(2). This approach allows you to:

  • Build the container once
  • Include it directly in your custom OS image
  • Eliminate container pull/build time on the device

Alternative Development Approaches

For faster iteration during development, consider:

  1. Hybrid approach: Use Qt Creator for rapid development and testing, then containerize for production deployment
  2. Development containers: Create a lightweight development container with just your application, using volume mounts for code changes

The one-hour build time suggests the container is rebuilding Qt and all dependencies from scratch. Using pre-built base images and optimizing your Dockerfile structure should significantly reduce this time.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

I am new to docker, so it’d would be more useful to me to receive specific indications to optimize the Dockerfile (or whatever) rather than general recommendations which I am not sure how to implement.

Thanks in advance.

Hi @vic!

Are you building in debug or release mode? Debug mode should be faster because it doesn’t need to rebuild everything in each build.
Another thing you could try is to press F5 without changing anything. If it starts to rebuild, your cache is not working as expected (which could also affect build time).

Best regards.