Martin Hořeňovský
fb2e4fbe41
Improve performance of writing JSON values
...
The old code was exceedingly simple, as it went char-by-char and
decided whether to write it to the output stream as-is, or escaped.
This caused a _lot_ of stream writes of individual characters.
The new code instead looks for characters that need escaping, and
bulk-writes the non-escaped characters in between them. This leads
to about the same performance for strings that comprise of only
escaped characters, and 3-10x improvement for strings without any
escaping needed.
In practice, we should expect the former rather than the latter,
but this is still nice improvement.
2025-08-22 17:00:40 +02:00
..
2024-09-13 16:39:51 +02:00
2024-09-13 16:40:11 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-09-13 15:32:49 +02:00
2025-07-15 11:49:39 +02:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2022-12-09 00:40:01 +01:00
2025-04-07 15:45:34 -06:00
2022-10-28 11:30:15 +02:00
2023-05-28 21:04:16 +02:00
2023-07-19 17:04:43 +02:00
2023-05-29 00:55:20 +02:00
2023-05-28 21:04:16 +02:00
2023-05-28 21:04:16 +02:00
2025-08-12 14:38:50 +02:00
2023-01-12 15:01:47 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-09-13 16:40:11 +02:00
2024-09-13 16:40:11 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2025-08-08 00:01:38 +02:00
2024-02-12 00:52:53 +01:00
2025-07-30 20:20:38 +02:00
2025-07-21 21:50:43 +02:00
2022-10-28 11:30:15 +02:00
2025-04-29 13:15:34 +02:00
2023-08-05 18:21:38 +02:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2025-07-27 21:41:02 +02:00
2025-04-27 11:08:41 -06:00
2025-07-15 15:23:32 +02:00
2023-12-23 11:23:32 +01:00
2023-12-10 18:44:10 +01:00
2023-12-10 18:44:10 +01:00
2022-11-09 14:47:55 +01:00
2022-10-28 11:30:15 +02:00
2025-04-29 13:15:34 +02:00
2025-04-27 11:08:41 -06:00
2025-04-29 13:15:34 +02:00
2025-08-22 17:00:40 +02:00
2024-03-01 21:24:45 +01:00
2022-10-28 11:30:15 +02:00
2024-09-13 16:40:11 +02:00
2023-08-05 18:21:38 +02:00
2022-10-28 11:30:15 +02:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2022-11-20 17:03:29 +01:00
2025-07-15 15:23:32 +02:00
2022-10-28 11:30:15 +02:00
2025-07-21 21:50:45 +02:00
2022-12-09 16:18:33 +01:00
2022-10-28 11:30:15 +02:00
2025-06-15 13:26:38 -06:00
2023-05-06 15:22:02 +02:00
2024-08-13 23:32:24 +02:00
2024-08-13 23:32:24 +02:00
2022-12-12 12:15:42 +01:00
2022-10-28 11:30:15 +02:00
2024-03-12 22:57:59 +01:00
2023-12-10 18:44:06 +01:00
2023-12-10 18:44:06 +01:00
2023-05-07 20:58:54 +02:00
2022-10-28 11:30:15 +02:00
2025-07-08 14:26:25 +02:00
2023-12-10 19:53:46 +01:00
2024-09-13 16:40:11 +02:00
2025-07-02 13:30:36 +02:00
2022-10-28 11:30:15 +02:00
2023-12-10 21:37:12 +01:00
2022-10-28 11:30:15 +02:00
2023-11-14 22:52:15 +01:00
2023-03-22 23:58:44 +01:00
2024-03-01 21:24:45 +01:00
2023-12-23 11:23:32 +01:00
2024-09-13 16:40:11 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2025-07-24 10:10:00 +02:00
2025-07-24 10:10:00 +02:00
2023-12-23 11:23:32 +01:00
2025-04-26 22:46:42 -06:00
2025-04-27 11:08:41 -06:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2023-03-22 19:12:32 +01:00
2025-04-26 22:46:42 -06:00
2023-01-08 20:08:58 +01:00
2025-04-27 11:08:41 -06:00
2024-03-01 21:24:45 +01:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2025-07-15 15:23:32 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-04-08 13:57:59 +02:00
2024-04-08 13:57:59 +02:00
2023-02-20 15:19:57 +01:00
2023-04-29 12:55:51 +02:00
2023-03-12 00:45:31 +01:00
2023-03-12 00:45:31 +01:00
2024-09-13 16:39:53 +02:00
2024-09-13 16:40:11 +02:00
2024-09-13 16:40:11 +02:00
2023-02-13 22:16:53 +01:00
2022-10-28 13:27:46 +02:00
2024-05-04 23:43:52 +02:00
2024-05-04 23:43:52 +02:00
2025-07-24 10:10:00 +02:00
2022-10-28 11:30:15 +02:00
2023-12-23 11:23:32 +01:00
2022-10-28 11:30:15 +02:00
2023-12-10 19:53:46 +01:00
2024-09-13 16:40:11 +02:00
2022-10-28 11:30:15 +02:00
2025-08-02 00:15:06 +02:00
2025-07-28 11:03:46 +02:00
2022-10-28 11:30:15 +02:00
2022-10-28 11:30:15 +02:00
2024-08-13 19:51:00 +02:00
2022-10-28 11:30:15 +02:00
2024-09-13 16:40:11 +02:00
2024-09-15 22:17:39 +02:00