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

Version 5.5 is 2.5 times faster than 6.0 and 7.0 #330

Open
nipmarsh opened this issue Jan 23, 2021 · 2 comments
Open

Version 5.5 is 2.5 times faster than 6.0 and 7.0 #330

nipmarsh opened this issue Jan 23, 2021 · 2 comments
Labels

Comments

@nipmarsh
Copy link

nipmarsh commented Jan 23, 2021

Hi,

I experience slowness when upgrading from 5.5 to 6.0 or 7.0.
5.5 is 2.5 faster than those versions
I'm using python 3.9, django 3.1.5 and restframework 3.12.2

This is related to pyuca install, if not install the speed is good

@SmileyChris
Copy link
Owner

Could it be related to the pyuca version? Otherwise if you have time, run a bisect and find when the problem started to help narrow it down :)

@maksam07
Copy link

Python 3.9.2
django-countries==7.0

models.py

class Country(models.Model):
    country = CountryField(unique=True)

    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(auto_now=True, db_index=True)

    class Meta:
        ordering = ['id']

    def __str__(self):
        return '%s' % self.country

admins.py

@admin.register(Country)
class CountryAdmin(admin.ModelAdmin):
    list_per_page = 25
    list_display = ('id', 'country', 'created', 'updated',)

Page load time tests in the admin panel (3 attempts):
No pyuca:

  1. 0,459s
  2. 0.305s
  3. 0.390s

pyuca==1.2:

  1. 9.07s
  2. 8.86s
  3. 9.02s

pyuca==1.1.2:

  1. 7.17s
  2. 7.42s
  3. 7.42s

pyuca==1.1.1:

  1. 7.32s
  2. 7.32s
  3. 7.28s

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

No branches or pull requests

3 participants