# Slow application start if recently used file is on unavailable network

**URL:** <https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970>\
**Category:** Support\
**Created:** [October 29, 2022, 8:33pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970 "2022-10-29T20:33:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 29, 2022, 8:33pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/1 "2022-10-29T20:33:31Z")

</div>

Maybe this is what I noticed today where it was hanging at initialization and would finally load modules after a noticeable delay. This happening on launch of the application (not just first startup). I use a multi monitor setup with my HP laptop and so maybe had Slicer last up on a multiple monitor, but this hang I observed today was without any external displays connected.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 29, 2022, 8:55pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/2 "2022-10-29T20:55:07Z")

</div>

Delayed startup is most likely a different issue than not starting at all. Delay may be due to Windows malware checks.

Are subsequent startups faster? Is startup slow again after restarting Windows?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 29, 2022, 9:32pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/3 "2022-10-29T21:32:30Z")

</div>

> [@lassoan](#):
>
> Are subsequent startups faster? Is startup slow again after restarting Windows?

Subsequent startups where equally slow and restarting Windows didn’t help.

It was only once I deleted the following file that it was fast to start again:  
“C:\Users\butlej30383\AppData\Roaming\NA-MIC\Slicer.ini”

I haven’t yet narrowed down the specific setting that might be causing the issue.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 30, 2022, 1:43am UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/4 "2022-10-30T01:43:33Z")

</div>

It might have been an an extension that did some time-consuming operations at startup.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 30, 2022, 5:23am UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/5 "2022-10-30T05:23:45Z")

</div>

Apologies if I have discovered a separate issue from what the “Slicer doesn’t load” original author was posting about.

@lassoan I didn’t have any extensions installed so I continued debugging. I was able to narrow it down to a setting specifying a recent file that is unavailable because it was on a local file share at work that I don’t have access to at home.

Slicer was hanging at the splash screen showing “Initializing user interface…” where it took 45 seconds for it to finally begin loading modules as seen on the splash screen. Once I removed the following key (see below) from the `RecentlyLoadedFiles` section, the startup of Slicer was back to being fast. I couldn’t even see “Initializing user interface…” at the splash screen because it was so fast.

Is Slicer doing checks on the recent files to determine if they are still present and in this case that request to the local file share (that isn’t connected anymore) takes a long time and only reaches a timeout after 45 seconds for that request?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/9/291df806e97fcf5080568ec67e54dcb4b2f0afa3.png)

`RecentFiles\1\file=@Variant(\0\0\0\b\0\0\0\n\0\0\0\x14\0s\0i\0n\0g\0l\0\x65\0\x46\0i\0l\0\x65\0\0\0\x1\x1\0\0\0\b\0s\0h\0o\0w\0\0\0\x1\x1\0\0\0\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0\x30\0\x39\0-\0\x32\0\x30\0_\0\x31\0\x34\0_\0\x30\0\x37\0/\0U\0n\0\x66\0u\0s\0\x65\0\x64\0V\0o\0l\0u\0m\0\x65\0.\0m\0h\0\x64\0\0\0$\0\x64\0i\0s\0\x63\0\x61\0r\0\x64\0O\0r\0i\0\x65\0n\0t\0\x61\0t\0i\0o\0n\0\0\0\x1\0\0\0\0\x16\0\x63\0o\0l\0o\0r\0N\0o\0\x64\0\x65\0I\0\x44\0\0\0\n\0\0\0\x32\0v\0t\0k\0M\0R\0M\0L\0\x43\0o\0l\0o\0r\0T\0\x61\0\x62\0l\0\x65\0N\0o\0\x64\0\x65\0G\0r\0\x65\0y\0\0\0\f\0\x63\0\x65\0n\0t\0\x65\0r\0\0\0\x1\0)`

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 30, 2022, 12:12pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/6 "2022-10-30T12:12:59Z")

</div>

Thank you for the investigation,this is a very interesting find. Network resources may take some time to become available, so it makes sense for the operating system to wait for them a bit.

Graying out unavailable files in the recent file list is a nice feature, but maybe we should replace it by an on-demand check, when the user selects an item. In case of failure, a popup could be displayed that has the option of removing the file from the list.

Could you submit an issue to the Slicer bugtracker about this? Thank you!

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 30, 2022, 3:26pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/7 "2022-10-30T15:26:59Z")

</div>

Issue created:

> <https://github.com/Slicer/Slicer/issues/6631>
>
> As originally discussed at https://discourse.slicer.org/t/slow-application-start…-if-recently-used-file-is-on-unavailable-network/25970/5.
> 
> While at work I opened a file in 3D Slicer that I had accessed from a local file share that is on our corporate network. When I went home and tried to start Slicer it was hanging at the "Initializing user interface..." step on the splash screen for 45 seconds before proceeding to load the Slicer modules. This was due to a setting for the recent files including the path to the local file share that I no longer had access to from my home network.
> 
> https://user-images.githubusercontent.com/15837524/198886694-549dc9ef-0bd9-4a79-81fd-a109248d2008.mp4
> 
> @lassoan has suggested maybe changing this to a runtime check rather than at startup. I also don't see a reason to wait 45 seconds trying to see if a file is still accessible from a file share location.
> 
> The specific code of interest is this section in \`restoreGUIState\`:
> https://github.com/Slicer/Slicer/blob/9a56f644406357394f42004133c6ee13ae7e3ad3/Base/QTApp/qSlicerMainWindow.cxx#L1694-L1702
> 
> \## Environment
> \- Slicer version: Slicer-5.1.0-2022-10-28, Slicer 5.0.3
> \- Operating system: Windows

---

<div class="post-metadata">

**Author:** ![fbordignon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fbordignon/32/5269_2.png) [@fbordignon](https://discourse.slicer.org/u/fbordignon)\
**Post date:** [October 9, 2025, 11:59am UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/8 "2025-10-09T11:59:17Z")

</div>

Hi guys, we are facing this issue right now. Our users are in a distributed filesystem environment that uses large files and scenes that cannot be saved locally. Most of the .mrml scenes are on network locations. Often times they move the mrml or delete them, and it takes 1m to timeout for each invalid path at the recent files list. One invalid network path takes the app launch time from 20s to 1m20s

Would it be a solution to have this check completely removed at startup and let the error happen when the user clicks to load a recent file that is not available?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 9, 2025, 1:06pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/9 "2025-10-09T13:06:43Z")

</div>

I would agree that the app should not check if the file still exists at startup when populating the recent files menu. It should just add the list of items and therefore will no longer show unavailable entries as disabled items in the menu. Upon clicking an item that is missing/unavailable the load event should fail. The item in the recent list should remain as-is and stay enabled as the file may be restored to its original location or the network connection may be restored to make it available.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 10, 2025, 12:59pm UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/10 "2025-10-10T12:59:19Z")

</div>

It is nice if it is visible that a file is unavailable, but I agree it is not worth delaying the application startup (or showing of the menu because of it), when the delay is long. We should do the check each time the most recently used file list is shown and disable the check for non-local files. But if these are not trivial to implement then it is simpler to just remove this check completely (it would be just a minor inconvenience for users, not happening very frequently).

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 11, 2025, 3:08am UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/11 "2025-10-11T03:08:42Z")

</div>

Another option is to do this kind of operation asynchronously.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 11, 2025, 3:17am UTC](https://discourse.slicer.org/t/slow-application-start-if-recently-used-file-is-on-unavailable-network/25970/12 "2025-10-11T03:17:54Z")

</div>

> Another option is to do this kind of operation asynchronously.

Yes, we cannot block the GUI each time the user open the most recently used files section, so if there is any check then it must be done in the background.
