Compile Time Drastically Increases After Adding Array of FStrings

After completing “Advanced Cursor Usage In VSCode,” I reran my unreal project and found that the compile time went from averaging about 4 seconds to taking 50 when I changed HiddenWordList.h. I determined that it is due to the large number of FString’s in the array I created inside of the file as when the array only has 1 element it compiles in 4 seconds whereas when it has 1000 it takes the 50. First, I am curious why this is the case, and second, is there a way to prevent this large of a compile time, such as loading the array from a text file that is not compiled? I am new to c++ so I do not know how it specifically handles compilation. My concern here is not so much that it took 50 seconds as it is that I do not understand why.

Thanks!

You can move that to runtime via the solution given here

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms