Opened 10 years ago
Last modified 9 years ago
#3356 accepted enhancement
Improve Susan buffers
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: | Adrian Pop |
Description
Susan has performance issues with large strings sometimes. I think adding a new language element and changing a few buffers could be a possible solution:
let &buf = buffer "" to let &buffer = fileBuffer "someFile" ""
Change History (3)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 9 years ago
Component: | *unknown* → Code Generation |
---|---|
Owner: | changed from | to
Status: | new → accepted |
It is feasible, but requires the user to rewrite some templates to consider streaming from top to bottom without temporary buffers and so on. Any let-expression will be calculated in a separate Tpl.Text (in-memory) and written later. This also means any temporary ticks, etc. are hard to write in an efficient manner (so we should get out new data structure for a new code generator as soon as possible while fulfilling all of my requirements for it).
Or perhaps (on an empty/non-empty Tpl.Text as input):
Or:
(Because I guess that would chain the Tpl.Text better in the current Susan generator.