Skip to content

refactor(deps): optimize dependency footprints, and add lazy initialization with platform-specific JPDFium bundling - #7620

Open
balazs-szucs wants to merge 8 commits into
mainfrom
deps-trim
Open

refactor(deps): optimize dependency footprints, and add lazy initialization with platform-specific JPDFium bundling#7620
balazs-szucs wants to merge 8 commits into
mainfrom
deps-trim

Conversation

@balazs-szucs

@balazs-szucs balazs-szucs commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

Bumps, removes deps. Tested with desktop/web. All OK.


Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have run task check to verify linters, typechecks, and tests pass
  • I have tested my changes locally. Refer to the Testing Guide for more details.

…zation with platform-specific JPDFium bundling
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file Java Pull requests that update Java code Back End Issues related to back-end development API API-related issues or pull requests Gradle Pull requests that update Gradle code refactor Code changes that neither fix a bug nor add a feature has conflicts Pull request has merge conflicts with the base branch labels Aug 22, 2026
@github-actions github-actions Bot removed the has conflicts Pull request has merge conflicts with the base branch label Aug 22, 2026
Changed sanitizeStructure from true to false in RedactController.
Added a comment indicating that the sanitizeStructure option is experimental and should not be enabled.
@balazs-szucs
balazs-szucs marked this pull request as ready for review August 22, 2026 20:42
@balazs-szucs
balazs-szucs requested review from a team and Ludy87 as code owners August 22, 2026 20:42
Copilot AI lite review requested due to automatic review settings August 22, 2026 20:42
@balazs-szucs
balazs-szucs requested a review from a team as a code owner August 22, 2026 20:42
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines ignoring generated files. label Aug 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors Gradle dependency wiring to reduce runtime footprint (dependency exclusions, slimmer packaging) and introduces optional Spring lazy-initialization for lower dev-mode memory usage, alongside a JPDFium upgrade and expanded redaction option flags.

Changes:

  • Bump JPDFium version and expand/auto-select native platform bundling logic.
  • Reduce dependency/JAR size via targeted transitive excludes and excluding .map sourcemaps from the boot JAR.
  • Add an opt-in -PlazyInit=true bootRun flag to enable Spring lazy initialization.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
build.gradle Bumps jpdfiumVersion, removes direct pixee toolkit dependency from all subprojects, adds opt-in lazy-init JVM arg for bootRun.
app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java Adds additional RedactOptions flags for improved text handling (ligatures/BiDi/graphemes).
app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java Mirrors new RedactOptions flags for API redaction behavior.
app/core/build.gradle Tightens transitive dependencies (OpenCSV/POI exclusions) and excludes .map files from the boot JAR.
app/common/build.gradle Moves pixee toolkit to common as an api dependency and adds/changes JPDFium native-platform bundling logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/common/build.gradle Outdated
Comment thread app/common/build.gradle
Comment thread app/core/build.gradle
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@stirlingbot

stirlingbot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

✅ Backend License Check Passed

All backend dependencies have valid and allowed licenses.

The backend license report has been updated successfully.

@balazs-szucs

Copy link
Copy Markdown
Collaborator Author

@Frooodle @Ludy87

This adds windows arm support of JPDFium. However, i have not checked if there is infra to build and publish. E.g., with this theoretically we could make desktop for windows but not sure that we have CI for that. This is to say, i am not quite certain how the CI works there may be as easy as adding windows arm to the matrix, but after this worthwhile to look into.

See this ticket: #7140

@github-actions

Copy link
Copy Markdown
Contributor

🚀 V2 Auto-Deployment Complete!

🔗 Direct Test URL (non-SSL) http://54.175.155.236:7620

🧩 Admin portal included - try it at http://54.175.155.236:7620/portal.

This deployment will be automatically cleaned up when the PR is closed.

🔄 Auto-deployed for approved V2 contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API-related issues or pull requests Back End Issues related to back-end development dependencies Pull requests that update a dependency file Gradle Pull requests that update Gradle code Java Pull requests that update Java code refactor Code changes that neither fix a bug nor add a feature size:XS This PR changes 0-9 lines ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants