hansva opened a new issue, #9349:
URL: https://github.com/apache/hop/issues/9349
### Apache Hop version?
2.20.0
### Java version?
21
### Operating system
Other
### What happened?
For every target field of every row, `AvroDecode.processRow()` (lines 84-97)
resolves the field name again and creates two value metadata objects:
`ValueMetaFactory.createValueMeta("standard", ...)` and
`TargetField.createTargetValueMeta()`. The second one also resolves the type,
length, precision and format again. Each creation scans the plugin registry and
uses reflection, and the new objects have no cached number or date formats, so
`convertData()` builds a new `DecimalFormat` or `SimpleDateFormat` each time.
Avro decode runs at about 25k rows/s on main; before #8968, profiling put 87%
of its CPU in this setup.
### Proposed fix
On the first row, resolve the field names and build each target field's
value metadata once. Keep the "standard" value metadata per target field and
Hop type, because the type comes from each record's schema and can differ
between records. Per row, only look up the field and convert. The output
doesn't change: the same types, formats and values.
### Issue Priority
Priority: 2
### Issue Component
Component: Transforms
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]