Opened 9 years ago

Last modified 8 years ago

#3356 accepted enhancement

Improve Susan buffers

Reported by: sjoelund.se Owned by: sjoelund.se
Priority: high Milestone: Future
Component: Code Generation Version: trunk
Keywords: Cc: adrpo

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 Changed 8 years ago by sjoelund.se

  • Cc adrpo 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 Changed 8 years ago by sjoelund.se

  • Component changed from *unknown* to Code Generation
  • Owner changed from somebody to sjoelund.se
  • Status changed from new to 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).

comment:3 Changed 8 years ago by sjoelund.se

Partially fixed by eadffd4

Note: See TracTickets for help on using tickets.