-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write pipelined tasty in parallel. #20153
write pipelined tasty in parallel. #20153
Conversation
I have yet to benchmark any theoretical performance gain - but I would assume it to be fairly trivial to predict on main branch by measuring how long the present |
acbb1c6
to
3279a4c
Compare
There should probably be a cancellation signal also |
3279a4c
to
97422d9
Compare
97422d9
to
8f5e659
Compare
Now in backend we block on the composition of the Zinc API callbacks and tasty being written. We also now conditionally signal that we are "done" writing tasty, based on if any units were suspended. This works in line with the Zinc default, which will ignore the early output anyway under the presence of macros (user can override this). Also move async tasty holder to the Run, as it is now context dependent on suspending. TODO: give the user an option to optimise performance by preventing definition of such problematic macros (which would also avoid suspensions).
8f5e659
to
a25d252
Compare
@sjrd all comments are addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I only have one comment left on the cancellation behavior.
sets up the executor in pickler to write the files as the final task, meaning we no longer read from
unit.pickled
, but directly send the tasty bytes to theserialized
holder, which queues up the internal name string of the class, and its bytes. When writing TASTy asynchronously, collect any logs into a buffer.When the task for writing is finished, complete a promise with info describing if the writing was successful, and any pending log messages.
when the promise completes, and no errors occur in writing tasty, then asynchronously call the Zinc callbacks which trigger downstream pipelined compilation.
await on the promise in GenBCode, at which point report any buffered errors
fixes #20101