feat: speed up javascript munging
Perform a single pass so the work of doing `m` replacements in a string of length `n` is O(m + n) instead of O(m * n) For the yogalogy template this change improves the script munging step from ~2.5ms to 0.5ms [release] (from ~17ms to 3ms [debug]).
This commit is contained in:
parent
028cc115a0
commit
cc4c1cf9d5
4 changed files with 186 additions and 185 deletions
|
|
@ -42,7 +42,7 @@ errorToString error =
|
|||
"Failure `" ++ message ++ "`"
|
||||
|
||||
NotFound sql ->
|
||||
"NotFound `" ++ sql ++ "`"
|
||||
"No rows returned by a query that expected to return at least one row. `" ++ sql ++ "`"
|
||||
|
||||
execute : Query a -> Result Error a
|
||||
execute query =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue