Merged
Conversation
Andrei-Fabian-Pop
approved these changes
Mar 27, 2026
Contributor
Andrei-Fabian-Pop
left a comment
There was a problem hiding this comment.
Looks nice, Godspeed 🫶
AlexandraTrifan
approved these changes
Mar 30, 2026
Building IIOWidgets for every device and channel attribute at connection time caused multi-second UI freezes on device-heavy contexts (e.g. M2k, ADRV9009). Signed-off-by: andreidanila1 <andrei.danila@analog.com>
Store iio_context on context and context-attribute items so that CliDetailsView can query libiio directly without depending on IIOWidget data strategies. Guard connectLog against empty widget lists to support eagerly created attribute items. Signed-off-by: andreidanila1 <andrei.danila@analog.com>
2678dcb to
5ba28a7
Compare
…View. Create all device/channel attribute items at connection time without constructing IIOWidgets, so the tree is fully populated for search immediately. Rewrite CliDetailsView to query libiio directly on a background thread instead of reading from IIOWidget data strategies. Signed-off-by: andreidanila1 <andrei.danila@analog.com>
5ba28a7 to
46e25c8
Compare
bindea-cristian
approved these changes
Apr 1, 2026
Contributor
bindea-cristian
left a comment
There was a problem hiding this comment.
Super fast loading
IonutMuthi
approved these changes
Apr 1, 2026
Contributor
IonutMuthi
left a comment
There was a problem hiding this comment.
I tested both using ssh and remote connection via IP on ADRV9375
Using ssh works fast.
Using the IP throw Analog VPN is slow, but this is generally true when using the VPN to access devices in the network
AlexandraTrifan
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existent problem
Connecting to a device-heavy IIO context (e.g. M2k, ADRV9009) caused the IIOExplorer UI to freeze for several seconds before becoming responsive. Profiling identified two root causes:
Stylesheet propagation over hundreds of already-constructed widgets
Style::setBackground is called in IIOExplorer::setupUI, after IIOModel has already been constructed with all its IIOWidget children attached to m_mainWidget. Setting a stylesheet on a parent widget triggers Qt to recursively re-polish every child widget in the hierarchy. With hundreds of IIOWidgets already attached, this single call accounted for 64.7% of the total freeze.
Blocking IIOWidget construction on the UI thread
IIOModel::IIOModel built all IIOWidget instances for every device and channel attribute at connection time. Internally, IIOWidgetBuilder::createUIS() performs synchronous libiio reads for every attribute that exposes an _available variant:
These reads are blocking network calls (USB/IP backend) made on the UI thread, one per attribute, before the window even appears. On a device with 20 channels × 5 _available attributes this results in 100 sequential blocking reads. Beyond the libiio reads, IIOWidgets construction itself is expensive (especially for device-heavy contexts) - each widget goes through style application, layout setup (and others) at creation time.
Changes
Tested on
I've tested this on Ubuntu 22.10, Kuiper 2-64, and Windows ADI using the ADRV9009 multidevice emu.
If possible, please also test on arm32 (and arm64) as well as macOS.
On Ubuntu, the performance improved from 4 seconds to 100 ms, and on Kuiper from ~50 seconds to ~2 seconds.