Commit a72636e
Robert Jackson
Avoid repeated encoding in getTemplateCompiler
`crypto.createHash('md5').update(...)` takes a buffer. The prior code would read the file as a string _then_ convert back to a buffer. Now we only convert to a string for `new vm.Script()` which _requires_ a string. tldr; we convert back and forth from a buffer to a string one less time with the code change here.1 parent 6b69fef commit a72636e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
0 commit comments