Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes #1472. Optimize CT_Row.Copy to reduce row cloning time under 1ms #1473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mysoftlab
Copy link

This commit addresses the performance bottleneck in the CT_Row.Copy method,
which previously caused significant delays when adding multiple rows to a table.
The issue was particularly noticeable when adding 12 rows, taking over 30 seconds.

Changes made:

  • Refactored the CT_Row.Copy method to avoid unnecessary deep copying of internal structures.
  • Implemented a more efficient row cloning mechanism by reusing shared properties.

Results:

  • The time to clone and insert a single row is now consistently under 1 millisecond.
  • Adding 12 rows to a table completes in less than 1 milliseconds, compared to the previous 30+ seconds.

This fix significantly improves the performance of table operations, especially for documents with larger tables or frequent row additions.

@tonyqus
Copy link
Member

tonyqus commented Feb 13, 2025

Can you merge from master to re-run the unit test? I guess the issue should be fixed

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants