Open
Bug 1861626
Opened 2 years ago
Updated 1 month ago
Use rtoml instead of toml to read test manifests
Categories
(Firefox Build System :: Task Configuration, enhancement)
Firefox Build System
Task Configuration
Tracking
(Not tracked)
NEW
People
(Reporter: marco, Unassigned)
References
(Blocks 1 open bug)
Details
Not sure how faster it is, but it's worth investigating.
Comment 1•2 years ago
•
|
||
rtoml is a compiled module, that makes it significantly harder to deploy. (even more so for decision tasks)
Comment 2•2 years ago
|
||
(also, the switch from tomlkit to toml didn't really impact decision task times, despite having had a dramatic effect on configure)
Reporter | ||
Comment 3•1 month ago
|
||
Time to read 7777 manifests:
import timeit
import toml
import tomlkit
import tomllib
import rtoml
with open("browser/base/content/test/popups/browser.toml", "r") as f:
manifest = f.read()
def parsewithtoml():
toml.loads(manifest)
def parsewithtomlkit():
tomlkit.parse(manifest)
def parsewithtomllib():
tomllib.loads(manifest)
def parsewithrtoml():
rtoml.load(manifest)
print(timeit.timeit('parsewithtoml()', number=7777, globals=globals()))
print(timeit.timeit('parsewithtomlkit()', number=7777, globals=globals()))
print(timeit.timeit('parsewithtomllib()', number=7777, globals=globals()))
print(timeit.timeit('parsewithrtoml()', number=7777, globals=globals()))
toml 4.716776925000886
tomlkit 70.1370183600011
tomllib 2.5913682589998643
rtoml 0.6805894560020533
You need to log in
before you can comment on or make changes to this bug.
Description
•