rsl / stringex

Some [hopefully] useful extensions to Ruby’s String class. It is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to Ascii transliteration], and StringExtensions [miscellaneous helper methods for the String class].
MIT License
984 stars 158 forks source link

Freeze the Dot character #180

Closed Fred-JulieDesk closed 8 years ago

Fred-JulieDesk commented 8 years ago

Hello,

Would it be possible to freeze the "." character in the master release of this gem?

The memory allocation of this character greatly increase memory usage of some applications making extensive usage of translations.

Without freezing the character: capture d ecran 2016-02-08 a 14 17 31

capture d ecran 2016-02-08 a 14 23 54

With the freezing:

capture d ecran 2016-02-08 a 14 25 08

With only this change in my application I have seen a decrease in the memory allocated of at least 5 MB (don't know if the displayed informations are in bits or bytes to be honest. I assumed it is in bits)

I wanted to perform a pull request but i can't figure out how to do it, so could you please do it yourself? I am sure it would help lots of people who might not have even noticed this problem.

Have a nice day,

Darep commented 8 years ago

Just happened to notice this issue while investigating some issues in our app and decided to give a helping hand with the pull request, see #181 :)

Fred-JulieDesk commented 8 years ago

cool thx, can you explain me in a few words how you did the pull request from my fork?

ty,

Fred-JulieDesk commented 8 years ago

i found it, nevermind

thx for the help

Have a nice day,

I close this issue

Darep commented 8 years ago

You're welcome! :)