Skip to content
New issue

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

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

Already on GitHub? # to your account

Horroristically slow #2

Closed
2colours opened this issue Jul 22, 2022 · 2 comments
Closed

Horroristically slow #2

2colours opened this issue Jul 22, 2022 · 2 comments

Comments

@2colours
Copy link

raku-community-modules/XML#63

I have to confirm, the horror story is true: I rendered a 1MB file in 20 seconds without calling encode-html-entities on string parts in HTML::Tag, with that call inside the render method, that was 160 seconds, and mind you, I didn't even have stuff to escape.

This level of inefficiency is a show-stopper. If the creators of the XML module can't do something with the performance, I think this module has to find a different basis in order to be useful at all.

@2colours 2colours changed the title Horroristically slow because of the XML module Horroristically slow Jul 22, 2022
@2colours
Copy link
Author

I edited the title because taking a look at the code, I started wondering if it is really the fault of the (otherwise actually terribly slow) XML module that this module is unusably slow. It might be simply because the trans method cannot bear with the sheer amount of generated substitution characters here.

@2colours
Copy link
Author

Closing this issue because - thanks @lizmat - https://github.com/lizmat/HTML-Entities-Fast exists now which does the exact same thing but, according to my calculations, more than 5 times faster.

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

No branches or pull requests

1 participant