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

Useless call of xdg-mime that is not working properly and slow down startup #4350

Open
avi9526 opened this issue Nov 23, 2024 · 0 comments
Open

Comments

@avi9526
Copy link

avi9526 commented Nov 23, 2024

  • Operating System (Linux/Mac/Windows/iOS/Android): Linux
  • Delta Chat Version: deltachat-desktop 1.46.8-1
  • Expected behavior: Fast startup
  • Actual behavior: Slow startup with freezing desktop (Plasma) for 1..2 seconds
  • Steps to reproduce the problem: Install Arch Linux, update it, install Plasma desktop, install DeltaChat, launch it and login, close, launch it as:

strace -c electron30 /usr/lib/deltachat-desktop/app.asar

close DeltaChat from tray icon after main window appears

strace report include:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ------------------
 90.08    0.388022       29847        13         1 wait4
  2.64    0.011358           7      1577           ppoll
  …

became root and do:

cd /bin/
mv xdg-mime /root/
cp -r echo xdg-mime

repeat strace run from above, output is:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ------------------
 38.23    0.021738        1672        13         1 wait4
 16.67    0.009478           5      1591           ppoll
 …

Changes in launch time is visually noticeable - it opens almost instantly

  • Screenshots:
    null
  • Logs:
    strace logs include
04:19:54 wait4(33498, xdg-mime: application argument missing
Try 'xdg-mime --help' for more information.
[{WIFEXITED(s) && WEXITSTATUS(s) == 4}], 0, NULL) = 33498 <0.273471>

It seems xdg-mime is not doing anything useful and quits with an error.

Fast workaround is:
/usr/bin/bash -c 'function xdg-mime { echo ; }; export -f xdg-mime; /usr/bin/deltachat-desktop --minimized'

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

No branches or pull requests

1 participant