sdomi changed the topic of #http.sh to: the coolest web framework (in Bash) to date :: logs: https://libera.irclog.whitequark.org/http.sh/ :: contributions welcome <3
Maja_ has quit [Ping timeout: 248 seconds]
sdomi has quit [Ping timeout: 248 seconds]
sdomi has joined #http.sh
<sdomi> considering implementing an additional way to call the templating engine
<sdomi> right now, you need to pass an assoc array with objects to replace, and if you have any iter objects, those need to be passed as references in additional arrays
<sdomi> which introduces 2 array copy operations per one item in an iterator, which gets slow quickly
<sdomi> improved this already last night, should be around 20% faster; however, I think that the go-to solution is to skip the array copy in general
<sdomi> so instead of doing the `nested_add` dance, you'd call `render_iter` and pass it an array directly, which would get immediately transformed into sed expressions; later on, when you call the proper `render` those would get executed like the normal iterator
<sdomi> i still need to think whether this will Just Work™ or require some stupid hacks. but it will probably be 2-3x faster for really big iterators
<sdomi> (... every time I feel like I hit an actual wall with performance and you just can't go faster because Shell, I find something stupid that gets us back to an acceptable level)