darkweak / go-esi

Pure implementation of the non-standard ESI (Edge-Side-Include) specification in Go
MIT License
22 stars 6 forks source link

Feature request: parallel processing of esi tags #12

Open p0358 opened 6 months ago

p0358 commented 6 months ago

If I'm reading the code correctly, right now all the esi tags are parsed and processed sequentially. This means that if there are 5 esi:includes each taking 50 ms, it'd add up to 250 ms instead of potentially only taking 50 ms if they were all requested at once.

A remedy to this would be to first parse the input, then process all found tags all at once, and only then insert the results in tags' place in the body to be returned.

darkweak commented 5 months ago

@p0358 I'm starting to work on that.