[
https://issues.apache.org/jira/browse/BEAM-10549?focusedWorklogId=467613&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-467613
]
ASF GitHub Bot logged work on BEAM-10549:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Aug/20 22:53
Start Date: 06/Aug/20 22:53
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #12352:
URL: https://github.com/apache/beam/pull/12352#discussion_r466727740
##########
File path: website/www/site/content/en/documentation/sdks/python-type-safety.md
##########
@@ -210,7 +210,21 @@ However, if you enable runtime type checking, the code is
guaranteed to fail at
{{< code_sample "sdks/python/apache_beam/examples/snippets/snippets_test.py"
type_hints_runtime_on >}}
{{< /highlight >}}
-Note that because runtime type checks are done for each `PCollection` element,
enabling this feature may incur a significant performance penalty. It is
therefore recommended that runtime type checks are disabled for production
pipelines.
+Note that because runtime type checks are done for each `PCollection` element,
enabling this feature may incur a significant performance penalty. It is
therefore recommended that runtime type checks are disabled for production
pipelines. See the following section for a quicker, production-friendly
alternative.
+
+### Faster Runtime Type Checking
+You can enable faster, sampling-based runtime type checking by setting the
pipeline option `performance_runtime_type_check` to `True`.
+
+The is a Python 3 only feature that works by runtime type checking a small
subset of values, called a sample, using optimized Cython code.
Review comment:
Ack. Sounds good to keep it as Python 3 only.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 467613)
Time Spent: 3h (was: 2h 50m)
> Improve Runtime Type Checking Performance
> -----------------------------------------
>
> Key: BEAM-10549
> URL: https://issues.apache.org/jira/browse/BEAM-10549
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Saavan Nanavati
> Assignee: Saavan Nanavati
> Priority: P2
> Time Spent: 3h
> Remaining Estimate: 0h
>
> The performance gain will come from moving the runtime type check from a
> decorator to OperationCounters.
>
> This has (2) improvements:
> # Cython optimizable
> # Sampling is a built-in feature
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)