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 Martin Sjölund, 9 years ago

Cc: Adrian Pop added

Or perhaps (on an empty/non-empty Tpl.Text as input):

let () = redirectTplToFile("someFile")

Or:

redirectTplToFile("someFile") + "rest"

(Because I guess that would chain the Tpl.Text better in the current Susan generator.

comment:2 by Martin Sjölund, 9 years ago

Component: *unknown*Code Generation
Owner: changed from somebody to Martin Sjölund
Status: newaccepted

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).

comment:3 by Martin Sjölund, 9 years ago

Partially fixed by eadffd4

Note: See TracTickets for help on using tickets.