Feature #31154
Updated by Lukas Zapletal about 4 years ago
When building report.body column which will be likely in JSON format internally, it is not necessary to create another Ruby hash in-memory and then dump it into a string. The body can be built using StringBuilder into buffer, the data format will be very easy (basically text lines with some metadata in the beginning). Reports are then only loaded on per-host per-report basis (e.g. when viewed). This can significantly speed up import time even more.
Also alternative (SAX-like) parsers should be considered when parsing HTTP request input. Rails default JSON request body parsing should definitely be turned off. Example library: https://github.com/dgraham/json-stream