Skip to content

Context menu delay caused by Unfold and Warpinator Python visibility checks in Mint 27 #3910

In progress

Description

@jorgenask86

Distribution

Linux Mint 27 Adrien (Beta), Cinnamon, X11

Package version

Nemo: 6.8.5+mint27+gridport1 Unfold: 1.0.5 Warpinator: 2.0.8+mint27 GLib: 2.88.0-1ubuntu0.1 Hardware: Dell XPS 13 9340

Session type

X11

Frequency

Always

Bug description

Right-clicking files in Nemo introduces a noticeable delay before the context menu appears. This happens on every right-click, not just the first one.

The desktop context menu remains responsive. I did not notice this behavior in Linux Mint 22.3.

I isolated the delay to two action visibility checks:

/usr/share/nemo/actions/unfold-compress-visible

/usr/share/nemo/actions/warpinator-send-check

Both are Python scripts importing Gio through PyGObject. Disabling both corresponding Nemo actions eliminates the noticeable delay. Enabling either action individually introduces a smaller delay.

Steps to reproduce

Open Nemo and navigate to a local directory containing regular files.

Right-click a file repeatedly.

Disable the Unfold Compress and Warpinator Send actions.

Right-click the same file again.

Compare the responsiveness.

Expected behavior

The context menu should appear immediately without sacrificing the existing Unfold and Warpinator functionality.

It would be great if these visibility checks could be optimized before the final Linux Mint 27 release.

Additional information

Performance measurements

I measured each visibility helper over 20 executions using Python's time.perf_counter().

Visibility helper Original Python C prototype Reduction
Unfold 121.4 ms 7.4 ms 93.9%
Warpinator 119.9 ms 4.9 ms 95.9%
Combined median estimate 241.3 ms 12.3 ms 94.9%

These measurements represent helper execution times, not direct measurements of the complete context menu rendering time.

Proposed solution

I implemented a small compiled C helper using Gio/GLib directly, avoiding Python and PyGObject startup overhead.

The prototype:

  • Preserves all 50 MIME types and their classification from the original Unfold helper.
  • Uses the original Warpinator D-Bus interface and timeout.
  • Preserves the tested visibility behavior and exit codes.
  • Is approximately 17 KB in size.
  • Requires no changes to Nemo's core code.

I installed replacement Nemo actions under /usr/local/share/nemo/actions/ and disabled the corresponding original actions through GSettings.

The context menu now appears effectively immediately on my system.

Verification

  • All 11 Unfold comparison tests passed, including compressed archives, directories, symbolic links, multiple files and filenames containing spaces.
  • Warpinator returns the correct exit code when its D-Bus service is unavailable.
  • Practical Nemo context menu and compression tests passed.
  • Rebuilding the C helper from source produced comparable performance.

Warpinator with active remote recipients has not yet been tested. The original synchronous D-Bus timeout also remains unchanged.

For transparency, my installed Nemo package contains an unrelated desktop icon grid patch. I have not repeated the complete GUI test using the unmodified Nemo package, but the helper benchmarks are independent of that patch.

nemo-context-menu-prototype.zip

Activity

  1. jorgenask86 commented on Nov 26, 2026

    @jorgenask86
    Author

    Also a delay with right click menu on folders

    Nemo-folder-color-performance-addendum.txt

  2. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions