# Very slow FIOSPlatformMisc::GetDiskTotalAndFreeSpace 

**URL:** <https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340>\
**Category:** Mobile\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [May 2, 2025, 2:16pm UTC](https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340 "2025-05-02T14:16:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 2, 2025, 2:16pm UTC](https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340/1 "2025-05-02T14:16:14Z")

</div>

Hi!

Recently we’ve noticed that in certain scenarios we had very substantial freezes on IOS devices. I’ve investigated it and found that it was caused by FIOSPlatformMisc::GetDiskTotalAndFreeSpace which we called multiple times in such scenarios Specifically it was a call to NSURLVolumeAvailableCapacityForImportantUsageKey which at least on some IOS devices takes around 70ms. Additionally it seems like it’s wrong to use this method since it returns not space which is currently free but space which may be freed by removal of some temporary files. So in order to fix it I replaced call to NSURLVolumeAvailableCapacityForImportantUsageKey with NSURLVolumeAvailableCapacityKey which is very fast. Is it ok to do so or maybe there were some reasong to use NSURLVolumeAvailableCapacityForImportantUsageKey specifically?

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 2, 2025, 10:50pm UTC](https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340/2 "2025-05-02T22:50:25Z")

</div>

Hi Ilya,

This was selected as the approach to expose the true maximum available space. However, given your observations of 70ms stalls (device information would be appreciated), we will be updating the implementation to make use of NSURLVolumeAvailableCapacityForImportantUsageKey and default to the fast and predictable NSURLVolumeAvailableCapacityKey.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 5, 2025, 8:40am UTC](https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340/3 "2025-05-05T08:40:33Z")

</div>

Hi [Content removed]

70ms was measured on iPad Air 4th Gen. Lags were noticed also at least on iPad 11 Pro.

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 5, 2025, 2:28pm UTC](https://forums.unrealengine.com/t/very-slow-fiosplatformmisc-getdisktotalandfreespace/2540340/4 "2025-05-05T14:28:27Z")

</div>

Thanks for the information Ilya.

Here is the official CL [https://github.com/EpicGames/UnrealEngine/commit/650a68de1a5d09b1acff8ba502e5cdb70202dbe4](https://github.com/EpicGames/UnrealEngine/commit/650a68de1a5d09b1acff8ba502e5cdb70202dbe4)

Best regards.
