Bug 448322 - Major slowdown when running applications as another user
Summary: Major slowdown when running applications as another user
Status: REPORTED
Alias: None
Product: frameworks-kdesu
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 14:28 UTC by Dan Dascalescu
Modified: 2022-01-14 08:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2022-01-12 14:28:49 UTC
SUMMARY
Running the same application as another user with `kdesu` results in that application reacting much more slowly. This is most easily visible with LibreOffice Calc scrolling through a spreadsheet.


STEPS TO REPRODUCE
1. Install the latest stable version of LibreOffice by unpacking (as of now) https://download.documentfoundation.org/libreoffice/stable/7.1.8/deb/x86_64/LibreOffice_7.1.8_Linux_x86-64_deb.tar.gz and executing `sudo dpkg -i *` in the DEBS directory.
2. Create another user, say `b`.
3. Locate a relatively complex spreadsheet, but even the simple 5000-row file from https://file-examples.com/index.php/sample-documents-download/sample-ods-download/ will do.
4. Open the spreadsheet in LibreOffice:
    /usr/local/bin/libreoffice7.1 --calc --view file_example_ODS_5000.ods
5. Notice that navigation is fast.
6. Open the same spreadsheet with the same LibreOffice executable, but as the other user (b): 
    /usr/lib/x86_64-linux-gnu/libexec/kf5/kdesu -u b -c "/usr/local/bin/libreoffice7.1 --calc --view file_example_ODS_5000.ods"
7. Notice navigation is much slower, especially when scrolling down.

The `kdesu` command line is exactly what the "Run as user" option of editing .desktop shortcuts executes.
To keep things simpler if you want to open the spreadsheet side-by-side with the user you're logged in as, vs. `b`, I used the `--view` parameter to open the file in read-only mode.

SOFTWARE/OS VERSIONS
KDE neon 5.23
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Kernel Version: 5.4.0-91-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8665U CPU @ 1.90GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Dan Dascalescu 2022-01-14 08:28:43 UTC
Uploaded a narrated screencast at https://youtu.be/pBQScCwr-8Y since it's larger than the max file size allowed here.