The @ (indirection) is not used only to write to a device (spool is a special type of device with number 2).
You may use the @ (indirection) to set any variable, array, list, object property or stream, while keeping this in memory:
S %B=@A
S %C("key1","key2")=@A
To increase your performance there are many factors and test that need to be done in order to take the best action (and approach). Some of them are:
1. Its highly recommended to identify the bottleneck before doing any action.
2. Hardware and infrastructure: Start by monitoring your infrastructure and hardware (network, memory, CPU) to check if there are any bottlenecks. Use task manager (or similar on Linux) to see if one or more disks are exhausted (100% active) - maybe splitting the databases and/or other Cache components (e.g. journals, WIJ, IRISTEMP etc.) between different disks might solve that issue. check if server has enough memory. How many processes are there? is the O/S using swap files when memory is low?
2. Check IRIS (or Cache) related issues: memory usage (are you allocation enough global and routine buffers) heap etc. - are there any errors in console.log that might show any potential issues?
3. Some production related things:
a. Can you run your process in parallel (pool size > 1) - maybe the bottleneck is there
b. Code - is your code optimized - use MONLBL to check the most "overwhelmed" places in your code
c. Journaling & mirroring might slow things if a lot of "temporary data" is journaled and mirrored
This is just the tip of the iceberg... there are many more things that can be done.
If you feel lost, I recommend that you open a WRC to get specific (your system related) help.
I would try to:
1. check if there is a header for "Content-Length" (the client is setting this)
2. As the %CSP.Request is a stream you might try to check it's "size" property
3. Find the global(s) that are storing this request (not sure which, maybe ^%csp.session or some CacheTemp.csp* with the sessionID - would be a bit complex since its not documented.