apache/beam

python typehints: reduce the number of runtime-type-check wrappers

Aperta

#20.226 aperta il 4 giu 2022

 (4 commenti) (0 reazioni) (0 assegnatari)Java (4097 fork)batch import
P3bugcoregood first issuepythontypes

Metriche repository

Star
 (7313 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

The --runtime_type_check flag is considered to be a performance penalty. One of the possible slowdowns is the wrapper around DoFn.process(), which adds an extra call to the wrapped process() method. Currently, there are 2 wrappers applied: OutputCheckWrapperDoFn and TypeCheckWrapperDoFn. These could be merged into one to possibly save on overhead.

Imported from Jira BEAM-9489. Original Jira may contain additional context. Reported by: udim.

Guida contributor