You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was developing a relatively large website using happyx. At some point, compiling the server code began to take several minutes, and the binary took up a lot of space (around 16 megabytes). I looked into the code generated by the Nim compiler. Most of the server's code was taken up by regular expressions. Then I tried to implement the same functionality (routing to about 40 different urls) using url.split('/') and a small macro. The compilation speed increased 15 times, and the binary began to weigh 3 times less. I haven't measured the parsing speed, but I don't think it's any more significant than using regular expressions. Is it possible to somehow implement routing in happyx using a simpler method than RegEx?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I was developing a relatively large website using happyx. At some point, compiling the server code began to take several minutes, and the binary took up a lot of space (around 16 megabytes). I looked into the code generated by the Nim compiler. Most of the server's code was taken up by regular expressions. Then I tried to implement the same functionality (routing to about 40 different urls) using
url.split('/')and a small macro. The compilation speed increased 15 times, and the binary began to weigh 3 times less. I haven't measured the parsing speed, but I don't think it's any more significant than using regular expressions. Is it possible to somehow implement routing in happyx using a simpler method than RegEx?All reactions