Hmm, you may be getting in trouble because, IIRC, the MIMXRT1170 OCRAM and ITCM banks aren't large enough to fit a 512kB program. Space can be dynamically reassigned between these banks via fuses or the IOMUXC_GPR registers, see the AN12077 application note for details. However, it may be a struggle to fit your entire application in RAM, especially because you will lose a lot of speed if you can't keep the stack and local variables in DTCM (this bank is approx. 3x faster than OCRAM for reading and writing data)
Rather than moving your entire application to RAM, it might be easier to find the specific functions that are being slowed down and move only those functions to RAM. MCUXpresso SDK provides a macro for this, AT_QUICKACCESS_SECTION_CODE, which will put your function in a special section that makes it get loaded to RAM. To use it, declare your function like this:
AT_QUICKACCESS_SECTION_CODE(void myFunction(void));
This makes sure it will run from RAM.
Another thing to note is, in my experience with MIMXRT, its instruction caching is usually pretty good. Commonly functions will run slower (5-10x slower) the first time they execute due to having to read the instructions from flash, but after that they will be in the I-cache so they will run quickly. Is it possible to update your code to "warm up" the cache with some sort of dry run, before the actual time sensitive code starts?