christianwgd / django-bootstrap-icons

A quick way to add Bootstrap Icons with Django template tags.
MIT License
24 stars 7 forks source link

Multiple instances of icons causes site to exponentially slow down #7

Closed supun-kalhara closed 3 years ago

supun-kalhara commented 3 years ago

As I loaded more icons in my template file on my django project, the site slowed down considerable. Even when I included just 5 icons there was a noticeable difference in site load times. I'm not sure why this is currently but it's a huge downside to using icons in django templates this way.

christianwgd commented 3 years ago

This is why i introduced the icon cache in release 0.6.2 (issue #5, https://github.com/christianwgd/django-bootstrap-icons#configure-icon-cache). Did you try that? If that doesn't help, let me know, then we may have another problem.

supun-kalhara commented 3 years ago

Yes this worked; I'm somewhat new to django so I didn't fully understand your documentation, thank you so much.