question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 2.0.0 significantly slower

See original GitHub issue

Took me some time to find the culprit, but after upgrading to sqlitedict 2.0.0 the writing is significantly slower.

I am writing with:

with SqliteDict("tmp.db") as tmp:
    tmp["tmp"] = 1

Is this expected due to some new functionality?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mpenkovcommented, May 11, 2022

It’s not quite the same functionality, because the superclass defines that variable and changes its value as it sees fit.

$ grep -B 10 _initialized /usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py --max-count 1

class Thread:
    """A class that represents a thread of control.

    This class can be safely subclassed in a limited fashion. There are two ways
    to specify the activity: by passing a callable object to the constructor, or
    by overriding the run() method in a subclass.

    """

    _initialized = False
1reaction
mpenkovcommented, May 11, 2022

I think I’ve found the commit that caused the problem, now trying to work out why something so trivial is causing such a performance regression:

$ git bisect log
git bisect start
# bad: [fdaf06167eebbd22ecd6932ac54487d4f3db1713] update changelog
git bisect bad fdaf06167eebbd22ecd6932ac54487d4f3db1713
# good: [ca6758fadd55e4ee7f36b26e3a39558954e91bc6] update author_email to work with PyPI
git bisect good ca6758fadd55e4ee7f36b26e3a39558954e91bc6
# good: [d5db9e67ecfd9908c06efa9d7a4a9e3e9145550c] More cleanup for flake8
git bisect good d5db9e67ecfd9908c06efa9d7a4a9e3e9145550c
# good: [e6a81f0558b6aa0e4bf4984466c6373d3aee2b52] README.rst: update performance notes.
git bisect good e6a81f0558b6aa0e4bf4984466c6373d3aee2b52
# bad: [12f023652674cd9e061c806fd1d50e3c1958f68d] minimum supported Py version is 3.7
git bisect bad 12f023652674cd9e061c806fd1d50e3c1958f68d
# bad: [3f2df9bb557e3351bc16843612e9090d7f5ba784] update python-package.yml
git bisect bad 3f2df9bb557e3351bc16843612e9090d7f5ba784
# bad: [bb8087ceb4408c0e10e3591912a7596b9448358d] Update sqlitedict.py
git bisect bad bb8087ceb4408c0e10e3591912a7596b9448358d
# bad: [90c16aeaaa69c831c7f71370d560e880c5d630ae] Rename initialized variable to not collide with superclass'es internal one
git bisect bad 90c16aeaaa69c831c7f71370d560e880c5d630ae
# first bad commit: [90c16aeaaa69c831c7f71370d560e880c5d630ae] Rename initialized variable to not collide with superclass'es internal one

https://github.com/RaRe-Technologies/sqlitedict/commit/90c16aeaaa69c831c7f71370d560e880c5d630ae

Read more comments on GitHub >

github_iconTop Results From Across the Web

Batches in >=2.0.0 are significantly slower · Issue #145
I believe there is a change of API or a performance issue when using batches with 2.1.0. Environment details OS type and version:...
Read more >
Star Exterminator Version 2.0.0 Slow Slow Slow
So I updated to the latest AI version 11 and SXT version 2.0.0 this morning. Took 1h 11m to process a roughly 70Mpx...
Read more >
Version 2.0.1 causes page editing to be extremely slow
Version 2.0.1 fixes the front-end issue of the Review block but makes editing a page extremely slow. And it seems progressive so the...
Read more >
python - Why tensorflow 2.0.0(official) is much slower than ...
Under ubuntu 18.04, using PyCharm as the IDE, running the same code, just a 3-linear layer network, to train an RL agent to...
Read more >
Arduino IDE 2.0.0-rc8 available for download!
A new release candidate of Arduino IDE 2.0.0 is now available. ... or upload operations were significantly slower in Arduino IDE 2.x than ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found