Project

General

Profile

Actions

Feature #31154

closed

Optimize data during report import

Added by Lukas Zapletal over 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Reporting
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

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


Related issues 1 (1 open0 closed)

Related to Foreman - Tracker #31142: New report model and import/view mechanismNewLukas Zapletal

Actions
Actions #1

Updated by Lukas Zapletal over 3 years ago

  • Related to Tracker #31142: New report model and import/view mechanism added
Actions #2

Updated by Lukas Zapletal over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Lukas Zapletal almost 3 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF