Performance issues when upgrading from 3.7.1 to 3.7.4
See original GitHub issuehttps://codesandbox.io/s/brython-in-webworker-ss03z
Set in javascript
inputs['test'] = ["1"]
Processed in Brython webworker
l = inputs['test']
for i,v in enumerate(l):
l[i] = v + " TEST"
outputs.list = l
v3.7.0 Brython Complete 181.6349999862723 <— Time to just execute brython script TOTAL TIME: 587.0599999907427 <— Time to transfer data via post message execute brython script and transfer back
v3.7.4 Brython Complete 4222.049999982119 <— Time to just execute brython script TOTAL TIME: 4548.055000021122 <— Time to transfer data via post message execute brython script and transfer back
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
What's New In Python 3.7 — Python 3.11.1 documentation
This resolves a long standing issue where all virtual environments would have to be upgraded or recreated with each Python update. However, note...
Read more >When should you upgrade to Python 3.11?
The problem is that Python isn't supported indefinitely, nor do libraries support all Python versions indefinitely; eventually you'll stop ...
Read more >How to Update Python 2 to Python 3 - The Couchbase Blog
This document is a collection of tips and tricks we learned while upgrading to Python 3 along with common problems we encountered during...
Read more >Upgrade Performance Center - TechDocs - Broadcom Inc.
After you upgrade the Data Repository component, upgrade the npc component.
Read more >How to update Python from version 3.7.1 to 3.7.2 in Windows 10
Is Windows 7 better due to its simplicity? Yes…that's probably why people liked it so much. Windows 10 on the other hand has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have found the reason : the culprit is the
json
module which is imported in the script.Until version 3.7.1 it was a Brython-specific version of the stdlib module, built on top of Javascripts’s JSON object. Because of issues reported in #1116 and #1117, I had to replace it with the CPython stdlib package. Unfortunately it is much longer to import and this explains what you observe.
Instead of this package, you can still use the Javascript JSON object, which is available as the attribute
JSON
ofbrowser.window
. Instead ofyou can use the much faster
From 3.7.4 onwards,
JSON
is also an attribute of thejavascript
module.I am closing this issue, once again many thanks for the report and the proposals. If you can develop a Javascript equivalent of the module, please submit a PR.