Commit d746aca
Skip Jackson serialization for primitives in PyishObjectMapper
In 3.0, LegacyOverrides.THREE_POINT_0 defaults usePyishObjectMapper=true,
causing every expression output to go through full Jackson ObjectWriter
serialization. For String/Number/Boolean (the vast majority of expression
results), this is unnecessary -- val.toString() produces the same output.
This was the single largest source of the 3.0 vs 2.8.x regression.
Benchmark: +104% throughput on complexTemplateBenchmark (3,316 -> 6,772 ops/s)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent fad3d39 commit d746aca
File tree
1 file changed
+6
-3
lines changed- src/main/java/com/hubspot/jinjava/objects/serialization
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
0 commit comments