django-countries
django-countries copied to clipboard
Version 5.5 is 2.5 times faster than 6.0 and 7.0
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
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 :)
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:
- 0,459s
- 0.305s
- 0.390s
pyuca==1.2:
- 9.07s
- 8.86s
- 9.02s
pyuca==1.1.2:
- 7.17s
- 7.42s
- 7.42s
pyuca==1.1.1:
- 7.32s
- 7.32s
- 7.28s