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

[OO] Major performance improvements & fixes #12221

Merged
merged 4 commits into from
Nov 24, 2024
Merged

Conversation

subhramit
Copy link
Collaborator

@subhramit subhramit commented Nov 23, 2024

CSL4LibreOffice - Performance improvements and fixes

Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/697

  • Reduces the number of UNO API calls -
    a) The OOTextIntoOO#write() method by default shifts the cursor to the end of the text after operations are done, so calling cursor.collapseToEnd() everywhere is needless.
    b) Explicit deletion of extra newlines/paragraph breaks using cursor.setString() is no longer needed in case of numeric styles - RegEx in transformHTML is now adapted to handle it before it is inserted into the document, which is way faster.

  • Changes newlines in bibliography to paragraph breaks, improving performance of documents with a large number of bibliographic entries drastically, as per information from https://bugs.documentfoundation.org/show_bug.cgi?id=163984
    Old:
    image
    New:
    image

  • Fixes extra newlines before each numeric bibliographic entry, which also used to cause one to be placed after the title (see comparison above)

  • Some miscellaneous documentation enhancements

Credits to @ThiloteE for investigating and the @LibreOffice community for prompt support!

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user) [Changes in unreleased]
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@subhramit subhramit added this to the 6.0-alpha milestone Nov 23, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

@subhramit
Copy link
Collaborator Author

subhramit commented Nov 23, 2024

Feels weird to not pass my own tests 😅
Thankfully for good reason. We don't need the unnecessary newlines anymore.

@subhramit subhramit added bug Confirmed bugs or reports that are very likely to be bugs status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers openoffice/libreoffice type: performance labels Nov 23, 2024
calixtus
calixtus previously approved these changes Nov 23, 2024
@calixtus
Copy link
Member

Looks good. Thanks for keeping up the work on your code.

@Siedlerchr Siedlerchr added this pull request to the merge queue Nov 24, 2024
Merged via the queue into JabRef:main with commit de81430 Nov 24, 2024
23 checks passed
@Siedlerchr Siedlerchr deleted the oo-fix branch November 24, 2024 09:35
@subhramit subhramit removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 24, 2024
Siedlerchr added a commit that referenced this pull request Nov 25, 2024
* upstream/main:
  [OO] Major performance improvements & fixes (#12221)
  move check for invalid characters to linked files editor (#12219)
  Update Gradle Wrapper from 8.11 to 8.11.1 (#12218)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs openoffice/libreoffice type: performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants