Skip to content

Revert "fix: [zip] improve ARM platform plugin selection for large files"#388

Merged
max-lvs merged 2 commits intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle
Apr 15, 2026
Merged

Revert "fix: [zip] improve ARM platform plugin selection for large files"#388
max-lvs merged 2 commits intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle

Conversation

@LiHua000
Copy link
Copy Markdown
Contributor

@LiHua000 LiHua000 commented Apr 15, 2026

Summary by Sourcery

Enhancements:

  • Revert complex size-based conditions for choosing the ZIP compression backend on aarch64 and rely only on the proportion of the largest file.

@github-actions
Copy link
Copy Markdown

TAG Bot

TAG: 5.12.28
EXISTED: no
DISTRIBUTION: unstable

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 15, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Reverts the previous complex ARM-specific zip compression plugin selection logic and restores the original simple heuristic that uses libarchive only when large files dominate, while leaving non-ARM behavior unchanged.

Flow diagram for ARM zip plugin selection heuristic

flowchart TD
  A[Start slotCompress on __aarch64__] --> B[Compute maxFileSizeProportion = maxFileSize_ / m_stCompressParameter.qSize]
  B --> C{Is maxFileSizeProportion > 0.6?}
  C -- Yes --> D[Set bUseLibarchive = true]
  C -- No --> E[Set bUseLibarchive = false]
  D --> F[Continue compression setup]
  E --> F[Continue compression setup]
  F --> G[End ARM-specific selection]
Loading

File-Level Changes

Change Details Files
Simplify ARM aarch64 zip compression backend selection to only use libarchive when large files make up more than 60% of the total archive size.
  • Remove multiple threshold-based conditions that switched to libarchive based on max file size and total archive size combinations
  • Restore a single heuristic that computes the ratio of the largest file size to the total size and chooses libarchive only when this ratio exceeds 0.6
  • Keep non-aarch64 logic unchanged so only ARM-specific behavior is affected
src/source/mainwindow.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • When computing maxFileSizeProportion, add a guard for m_stCompressParameter.qSize == 0 to avoid potential division-by-zero on empty or invalid input.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- When computing `maxFileSizeProportion`, add a guard for `m_stCompressParameter.qSize == 0` to avoid potential division-by-zero on empty or invalid input.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000, max-lvs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@max-lvs max-lvs merged commit 4d8f11a into linuxdeepin:release/eagle Apr 15, 2026
17 checks passed
@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot bot commented Apr 15, 2026

TAG Bot

Tag created successfully

📋 Tag Details
  • Tag Name: 5.12.28
  • Tag SHA: 76117833a77f3f8bbbe2e4fac4c0efbec50c7859
  • Commit SHA: e0b5cf16f326764742eb78759404bd6c78a2bceb
  • Tag Message:
    Release deepin-compressor 5.12.28
    
    
  • Tagger:
    • Name: LiHua000
  • Distribution: unstable

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