Skip to content
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

Random perf improvements #521

Merged
merged 4 commits into from
Mar 10, 2021
Merged

Random perf improvements #521

merged 4 commits into from
Mar 10, 2021

Conversation

MihaZupan
Copy link
Collaborator

Brings over some of the changes from #499:

  • Caching the default pipeline
  • Caching for custom writers
  • Reduced MarkdownObject size
  • Removed most heap allocations from ProcessInlines loop

ResetInternal();
}

internal void ResetInternal()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is now a split between an exposed Reset and internal ResetInternal.

protected internal void Reset()
{
    // Reset Writer

    ResetInternal();
}

internal void ResetInternal()
{
    // Reset internal state
}

We only use ResetInternal in the library as we can't reset an arbitrary writer.

Would it make sense to change the exposed Reset to not reset the writer and leave that to the caller instead?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have enough insights on the implication, so I trust your choice 😉

@xoofx xoofx merged commit 4a57035 into xoofx:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants