Skip to content

Conversation

@mark-sil
Copy link
Contributor

@mark-sil mark-sil commented Jul 16, 2025

There was data in a DocFragment that was only needed by the fragment that was going to write to the docx file. We now moved that data to a MasterDocFragment and only have a Body in the regular DocFragment. Regular DocFragments are frequently created and discarded. Not having them open a memory stream saves a significant amount of time. Combined with the performance improvements in commit e1943fb, export times are now 30% to 50% of previous times.

Change-Id: I9ec6fa92709d3562c9331ec30c4c2920a71468b4


This change is Reviewable

There was data in a DocFragment that was only needed by the
fragment that was going to write to the docx file. We now moved
that data to a MasterDocFragment and only have a Body in the
regular DocFragment. Regular DocFragments are frequently created
and discarded.  Not having them open a memory stream saves a
significant amount of time.  Combined with the performance
improvements in commit e1943fb, export times are now 30% to
50% of previous times.

Change-Id: I9ec6fa92709d3562c9331ec30c4c2920a71468b4
Copy link
Contributor

@aror92 aror92 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mark-sil)


Src/xWorks/LcmWordGenerator.cs line 944 at r1 (raw file):

			public void Flush()
			{
				WordFragment.MemStr.Flush();

Do we want a Flush method like this for the MasterDocFragment class?

Copy link
Contributor

@aror92 aror92 left a comment

Choose a reason for hiding this comment

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

This is a really nice change & exciting performance improvement

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mark-sil)

Copy link
Contributor Author

@mark-sil mark-sil left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aror92)


Src/xWorks/LcmWordGenerator.cs line 944 at r1 (raw file):

Previously, aror92 (Ariel Ror.) wrote…

Do we want a Flush method like this for the MasterDocFragment class?

If there is a need for it then we can add it at that time.  This Flush method is never being called on what is now the MasterDocFragment, so I didn’t see a reason to add it.

Copy link
Contributor

@aror92 aror92 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mark-sil)

@mark-sil mark-sil merged commit 7ed0d8c into release/9.3 Jul 17, 2025
5 checks passed
@mark-sil mark-sil deleted the LT-22122a branch July 17, 2025 13:30
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.

3 participants