Download

high frequency async text loading/writing to HDD

I have UE4 and some other systems which communicate using the windows file system (ramdrive) - with external systems shifting in high frequency text messages/images while UE4 reads them and deletes them.

I am using FFileHelper::loadfilefromstring and FFileHelper::SaveStringToFile to read the text files, then IPlatform to tidy up/delete, at a high frequency. This is impacting FPS, showing spiking in the profiler, even after trying to distribute disk access to smooth things out

Does anyone know how I can make these async?

I have been looking at [TABLE=“cellspacing: 0”]

https://forums.unrealengine.com/core/image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==

		IPlatformFile::OpenAsyncRead()

[TABLE=“cellspacing: 0”]

IAsyncReadFileHandle *

		[OpenAsyncRead](https://docs.unrealengine.com/en-US/API/Runtime/Core/GenericPlatform/IPlatformFile/OpenAsyncRead/index.html)


		(
		    const [TCHAR](https://docs.unrealengine.com/en-US/API/Runtime/Core/HAL/TCHAR/index.html) * Filename
		)

but my C++ is not developed enough to understand how to implement this? Does anyone have an example?

Or would moving these functions to “dynamic delegates” and returning values smooth my FPS issues? Again I do not know exactly how these work

I have copied the code from Kismetlibrary::delay to look at async node creation but i cant seem to return values from this

Any input greatly appreciated!

any ideas? ;_; xD