Skip to content

SQLAlchemy 2.0.0 takes forever to lint #8150

Closed
@chaen

Description

@chaen

Bug description

Linting against sqlalchemy 2.0.0 is infinitely slower that against 1.4 series.
This was reported here: sqlalchemy/sqlalchemy#9181

# pylint: disable=missing-module-docstring

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

engine = create_engine("")
session = sessionmaker(engine)

Configuration

No response

Command used

time pylint slow.py

Pylint output

With sqlalchemy 2.0.0


time pylint slow.py 

-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 7.50/10, +2.50)


real    0m11.233s
user    0m11.080s
sys     0m0.112s

with 1.4.46

time pylint slow.py 

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)


real    0m4.149s
user    0m4.032s
sys     0m0.100s

On real life use cases, it goes from 6 seconds to 90 !



### Expected behavior

I would expect things to run faster

### Pylint version

```shell
pylint 2.15.10
astroid 2.13.4
Python 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 15:55:03) 
[GCC 10.4.0]

OS / Environment

Fedora 34, conda environment

Additional dependencies

sqlalchemy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs astroid updateNeeds an astroid update (probably a release too) before being mergableperformance

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions