Open the asset server connection before the scene needs it - #7317
Open the asset server connection before the scene needs it#7317camevor wants to merge 2 commits into
Conversation
Every remote asset lookup is one round trip on a kept-alive connection, but the first one also pays DNS resolution and the TCP and TLS handshakes. Instead, open the connection on a background thread once the extensions are loaded, so the handshake overlaps with the rest of startup. A run whose configured asset root is local opens no connection at all.
There was a problem hiding this comment.
Isaac Lab Review Bot
The asset-server prewarm is appropriately isolated in a private assets helper and covered for remote, repeated, and local-root behavior. One startup-order issue should be fixed: importing the assets module before the post-extension path sanitization can permanently cache dependencies from a conflicting Kit path.
- Design and architecture: The lifecycle split is sound: AppLauncher triggers the work after extensions load, while the assets module owns remote-root detection and the deferred omni.client operation. However, the trigger must occur after AppLauncher restores the intended Python import precedence.
- API: No public API compatibility issue is introduced. The helper remains private, existing asset-root symbols are unchanged, and the user-visible startup behavior has an appropriately phrased changelog fragment.
- Implementation: The one-shot guard, background daemon thread, local-path filtering, and deferred error handling match the intended prewarm behavior. Move the import and call below _deprioritize_prebundle_paths(); otherwise assets.py and its module-level dependencies, including filelock, may be resolved and cached from conflicting pip_prebundle paths before sanitization can take effect.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| # Nothing has asked for an asset yet, and the first thing that does -- building the | ||
| # scene -- would otherwise pay the connection handshake before its own lookup. Open | ||
| # it now instead, in the background. | ||
| from isaaclab.utils.assets import _prewarm_asset_server |
There was a problem hiding this comment.
🟡 Warning · Implementation — Prewarm import precedes path sanitization
This imports isaaclab.utils.assets (which imports filelock at module scope) before the _deprioritize_prebundle_paths() pass a few lines below, whose comment states the second pass exists because Kit and its extensions may have just inserted conflicting pip_prebundle directories onto sys.path. Modules resolved and cached here cannot be corrected afterwards. Move the prewarm import and call below _deprioritize_prebundle_paths(); the startup overlap benefit is unchanged.
Greptile SummaryThe PR starts a best-effort background request to a configured remote asset root after Isaac Sim extensions load, allowing connection setup to overlap the remaining startup work. It skips local roots, suppresses prewarm failures, and adds coverage for remote and local configurations.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The prewarm is limited to remote roots, runs after extension loading, contains failures without changing normal lookup behavior, and is covered for its principal remote and local cases. Important Files Changed
Sequence DiagramsequenceDiagram
participant L as AppLauncher
participant P as Prewarm thread
participant C as omni.client
participant S as Scene construction
L->>L: Load Isaac Sim extensions
L->>P: Start daemon thread for remote root
par Connection prewarm
P->>C: stat(asset root)
and Remaining startup
L-->>S: Return initialized application
S->>C: Perform first asset lookup
end
Reviews (1): Last reviewed commit: "Open the asset server connection before ..." | Re-trigger Greptile |
|
HI @camevor |
Description
Every remote asset lookup is one round trip on a kept-alive connection, but the first one also pays DNS resolution and the TCP and TLS handshakes. Instead, open the connection on a background thread once the extensions are loaded, so the handshake overlaps with the rest of startup. A run whose configured asset root is local opens no connection at all.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there