jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

If lxml and cssselect is installed we use them for better perf. #48

Closed jonathan-s closed 3 years ago

jonathan-s commented 3 years ago

Description

If you install sockpuppet with

pip install django-sockpuppet[lxml]

It will install everything that is required for django-sockpuppet to use the lxml parser when parsing all html fragments. This typically saves between 30-90ms depending on the complexity of the html we are parsing.

Needs some more testing with sockpuppet expo so that we actually have the same behaviour. Saw that there was some issues with the calendar view.

Fixes #46

Why should this be added

If you want a faster experience you can get one, if you're not able to install lxml (for whatever reason) you'll still be able to use beautiful soup.

Checklist