Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.0 Performance Regressions #82

Open
qeternity opened this issue Dec 31, 2019 · 1 comment
Open

v2.3.0 Performance Regressions #82

qeternity opened this issue Dec 31, 2019 · 1 comment

Comments

@qeternity
Copy link

qeternity commented Dec 31, 2019

Using Python 3.8.1 on Ubuntu 18.04 I find graphene to be 13-15% slower using 2.3.0 vs. 2.2.1 with the below simple benchmark. This is not a promises benchmark since we are not direct consumers of it, but I noticed on new services a slowdown and finally pinned it down to the updates Promise package.

import graphene
import timeit

class UserQuery(graphene.ObjectType):
    id = graphene.Int()

class Query(graphene.ObjectType):
    users = graphene.List(UserQuery)
    def resolve_users(self, info):
        return users

class User(object):
    def __init__(self, id):
        self.id = id

users = [User(index) for index in range(0, 1000)]
schema = graphene.Schema(query=Query)
print(timeit.timeit(lambda: schema.execute('{ users { id } }').data, number=1000))
@qeternity
Copy link
Author

Anything? Few months old now for a significant performance regression in a low level library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant