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

Appimage UX: Very long loading times of some Themes in AppImage #302

Open
2 tasks done
MiqCG opened this issue Jun 28, 2024 · 55 comments
Open
2 tasks done

Appimage UX: Very long loading times of some Themes in AppImage #302

MiqCG opened this issue Jun 28, 2024 · 55 comments

Comments

@MiqCG
Copy link

MiqCG commented Jun 28, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When in Light theme, shortcut for new file (Control + n) and others (Alt + f , Alt + e) don't work. If new file is created throw File menu with the mouse, then they work (see indications in the bottom part of the screencast).
I think there is the same problem with revision 37841 and 37543.
In some situations, clicking with the mouse on the menu bar doesn't work either.
On the other hand, looks like loading/activating the Light theme is much much slower than Classic theme, as you can see in the attached video.

I have searched in Github for [is:issue light theme shortcut] and [is:issue light theme new file] with no relevant results

Full version info

OS: Devuan GNU/Linux 5 (daedalus) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37898 (Git) AppImage
Build type: Release
Branch: main
Hash: 308013fb975ec3bf0dc5cb616ef76a4095e71cc5
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Catalan/Spain (ca_ES)
Installed mods: 
  * Movie 2024.2.15
  * sheetmetal 0.4.20
  * FreeCAD-motion-workbench-master
  * dodo 1.0.1
  * PieMenu 1.2.7
  * BillOfMaterials 0.0.8.5
  * fasteners 0.5.24

Subproject(s) affected?

Core

Anything else?

Light_theme.mp4

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz
Copy link
Collaborator

maxwxyz commented Jun 29, 2024

@MisterMakerNL FYI

@MiqCG
Copy link
Author

MiqCG commented Jun 29, 2024

I thought it was not happening in revision 37543 but it is. I edited the first post.
And is happening with "Dark behave" and "Dark theme" themes too.

@MiqCG
Copy link
Author

MiqCG commented Jun 29, 2024

Same behaviour in revision 37298.
Maybe it's not that keyboard shortcuts are not working but the times/speed of loading of this themes that prevent FreeCAD to obey. The theme is apparently loaded after long time but maybe it is not totally loaded and cannot accept those orders. Don't know.

When you confirm me this hypothesis, I can change the title of the issue.

Loading_times_37928:

Loading_times_37928.mp4

Loading_times_37898:

Loading_times_37898.mp4

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jun 29, 2024

@kadet1090 FYI

@MisterMakerNL
Copy link

I cannot reproduce this in windows with my own build.

@Syres916
Copy link
Contributor

For me this needs to be proven whether it's a distro specific issue, an actual FreeCAD code (which is now looking less likely) issue or a Conda packaging issue. As the OP's distro is originally based on Bookworm and I already have a Bookworm VM, I'll try that first.

If needed I'll then build and attempt to compile on a VM of Devuan GNU/Linux 5 (daedalus) (XFCE/xfce).

@Syres916
Copy link
Contributor

Could not reproduce the reported issue using Bookworm:

OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37931 (Git)
Build type: Release
Branch: main
Hash: f28394a376c285725abdacee3d72bd57a8b196aa
Python 3.11.2, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * sheetmetal 0.4.13
  * CfdOF 1.25.16
  * Assembly4 0.50.12

@Syres916
Copy link
Contributor

Can reproduce the reported issue using AppImage on Bookworm, going from Dark behave to Light theme is like watching paint dry and I can get it to raise FreeCAD 0.22dev is not responding Force Quit/Wait messagebox but the other way round is acceptable.

OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37928 (Git) AppImage
Build type: Release
Branch: main
Hash: e7699b531eba4bee262f7214699f07b96f66ba7b
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * sheetmetal 0.4.13
  * CfdOF 1.25.16
  * Assembly4 0.50.12

I have an older AppImage build 37302 which I'll have to extract and change the stylesheets over but that still won't prove if it's a Conda dependency that's changed, it really needs someone who can compile on Conda IMHO.

@MisterMakerNL
Copy link

Last lag issues where cause by switching Qstyle. But I also see issues with pixmap generation.
And third the biggest difference between behave and others is probably the use of custom colors not sure if those cause extended load times.

@Syres916
Copy link
Contributor

@MiqCG could you please change the title of the issue to specifically mention applies to the AppImage specifically.

@MisterMakerNL with the AppImage extracted it's absolutely acceptable so it doesn't seem to be a code or stylesheet issue, it's only with the AppImage in it's original state that the time to change is six to seven times longer.
Post release will probably need some more thought as to whether like the Templates for Techdraw they are copied out to the user's Shared folder on the first run or some other left field solution.

@MiqCG MiqCG changed the title Shortcuts don't work temporarily with Light theme Very long loading times of some Themes in AppImage Jun 30, 2024
@MiqCG
Copy link
Author

MiqCG commented Jun 30, 2024

@Syres916 , what about "Very long loading times of some Themes in AppImage"?

@Syres916
Copy link
Contributor

Absolutely fine, thanks.

@kinghat
Copy link

kinghat commented Jul 2, 2024

ive been having terrible freezes with the appimage weeklies for at least a couple months now. here you can see it using only the classic theme selection from start after deleting the freecad .cache/.config/share dirs. so it has a fresh state. it also took like 15s to start(after the loading screen):

Screencast_20240702_144457.webm

OS: Fedora Linux 40 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38001 (Git) AppImage
Build type: Release
Branch: main
Hash: 1fc6da959b936a2999774a4fe5b4c4b12bf6ac8d
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.6-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-5600U CPU @ 2.60GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500

@JigglyBuff-Kun
Copy link

I have the same issue mentioned as above. UI freezes for x seconds for every operation that is being done in FC. Sometimes It works, and I am able to do two operations. But sometimes just clicking on Create Parametric part in the start page freezes the UI for a good amount of time.
FC starts with a warning (qt.qpa.plugin) Could not find the Qt platform plugin "wayland" in ""
The issue goes way when I use X. This is Wayland specific I guess.

OS: Arch Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38079 (Git) AppImage
Build type: Release
Branch: main
Hash: de508e437d13e7eb35baffceea496fb9107888cb
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)

Operating System: Arch Linux 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 12th Gen Intel® Core™ i9-12900K
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 770

@MisterMakerNL
Copy link

should be fixed

@kinghat
Copy link

kinghat commented Jul 22, 2024

should be fixed

then the appimage freezes im having are unrelated as they continue as of:

OS: Fedora Linux 40 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38261 (Git) AppImage
Build type: Release
Branch: main
Hash: 51789ae8a1a0b1ed20317eaedcd190baac734e3d
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods:

  • OpenTheme 2024.7.3
  • fasteners 0.5.24
  • lattice2 1.0.0

@kadet1090
Copy link
Member

@kinghat does it happen in any particular scenario?

@kinghat
Copy link

kinghat commented Jul 30, 2024

@kinghat does it happen in any particular scenario?

its basically every interaction with the ui as shown in this video: #302

if i logout and back into my user session, before i run any other apps, i can sometimes get it to load and run without issues until i close it and open it again later on.

@MisterMakerNL
Copy link

MisterMakerNL commented Jul 30, 2024

I btw see you have opentheme, there was a bug in opentheme where the qtstyle script kept doing it thing causing lag.
Have you updated Opentheme?

@kinghat
Copy link

kinghat commented Jul 30, 2024

I btw see you have opentheme, there was a bug in opentheme where the qtstyle script kept doing it thing causing lag. Have you updated Opentheme?

in freecad ive been running the most up 2 date of everything. most recent addons/themes/dev builds. also fedora which is basically the most up 2 date of everything kde as well. theres a post on the forum: https://forum.freecad.org/viewtopic.php?t=87325 where other kde people are having the exact same issue.

@luzpaz
Copy link
Collaborator

luzpaz commented Jul 30, 2024

Is this specific to KDE ?

@kinghat
Copy link

kinghat commented Jul 31, 2024

Is this specific to KDE ?

i believe so.

@MiqCG
Copy link
Author

MiqCG commented Jul 31, 2024

Keeps happening with revision 38334 in an updated Linux Devuan 5 XFCE desktop.
Classic loads the faster, in 2-4 seconds aprox
Dark (from Classic) loads in 9-22 s aprox
Light (from Dark) loads in 14-27 s aprox

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 1, 2024

@MiqCG can you please add the full About info to your post? TIA
You are using XFCE and not KDE, correct ?

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

This is a first impression UX issue and frankly kind of embarrassing if we release 1.0 with it still open. The wait time is misleading and people think FC has crashed since there is no visual indication that the operation is ongoing.

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

@probonopd any chance you could help troubleshoot the delay ?

@luzpaz luzpaz changed the title Very long loading times of some Themes in AppImage Appimage UX: Very long loading times of some Themes in AppImage Sep 26, 2024
@MisterMakerNL
Copy link

Can we check if it is the preference pack or the stylesheet. And if the stylesheet, can we check if it is the overlay stylesheet or the normal one or maybe both?

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

@MisterMakerNL It's a vanilla install for me so no preference packs enabled. These are the bundled themes/stylesheets that come installed.

I'll check if overlay is enabled. I don't think it is enabled by default on vanilla installs, right ?

@Syres916
Copy link
Contributor

@MisterMakerNL this testing was carried out using build 38827 AppImage, extracting and then repacking the AppImage after each change to the FreeCAD Dark.cfg to only load what I required at each stage. Here are my findings and to be honest as I expected:

Change Requested Time To complete Change
Preference Pack Only 4.02 seconds
Pref Pack + Stylesheet Only 16.36 seconds
Pref Pack + Overlay Only 6.45 seconds
Pref Pack + Stylesheet & Overlay 33.75 seconds

@MisterMakerNL
Copy link

Do you check if the latest stylesheet are installed, or are you doing a fresh install? I have had issues where it didn't overwrite the older stylesheets?

@Syres916
Copy link
Contributor

My testing was with no existing user.cfg/system.cfg/FreeCAD.conf config files and only using the stylesheets provided in the AppImage, no other stylesheets/addons were involved. It's quite clear that the more lines of text in any of the cfg or qss files makes the changeover longer, as simple as that IMHO. It's basically 5.5 times slower as a packed AppImage versus an extracted one.

@MisterMakerNL
Copy link

But we are talking about files less then 80Kb that should needn't need 30 second load time...
Normally how I trouble should these issues is just delete half of the stylesheet, then test. if still long load times delete again half, and so keep going until I found the issue.
This is how I last time found Qwidget be the cause of the loading issues.

@probonopd
Copy link
Collaborator

Does this happen only on KDE Plasma on Wayland? Then it might be related to AppImage/AppImageKit#1351, the root cause of which is still unknown.

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

@Syres916
Copy link
Contributor

Does this happen only on KDE Plasma on Wayland?

Nope, I used OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon) for the above testing

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

I'll report back when my box is freed up from compiling.

@Syres916
Copy link
Contributor

@probonopd using --appimage-extract-and-run it takes 7.4 seconds instead of 33.75 seconds

@probonopd
Copy link
Collaborator

Is this on Wayland? If so, can you try on Xorg?

@Syres916
Copy link
Contributor

I thought the information above was clear that it's not on Wayland it's X-Cinnamon

@probonopd
Copy link
Collaborator

probonopd commented Sep 28, 2024

OK, then I don't have a hypothesis at the moment. Might be worth to experiment with different compression algorithms (we want to standardize on zstandard) and compression levels.

@kinghat
Copy link

kinghat commented Sep 28, 2024

Does this happen only on KDE Plasma on Wayland? Then it might be related to AppImage/AppImageKit#1351, the root cause of which is still unknown.

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

think this is fixed here: https://bugs.kde.org/show_bug.cgi?id=492584 my freecad freezing issues are not this one. also not sold on themes being the issue either.

@adrianinsaval
Copy link
Member

is this still relevant?

@kinghat
Copy link

kinghat commented Nov 2, 2024

is this still relevant?

i no longer have freezing/loading issues with the appimage on:

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland

@MiqCG
Copy link
Author

MiqCG commented Nov 2, 2024

I think it is still relevant but you can judge if the times are correct.
In a fresh install of 39092 revision (as 39100 is problematic) the loading times in the start page are around 1 second or less. But if you choose one theme and then close FreeCAD and reopen it, the theme change times through Preferences are:

  • from Light to Dark ~ 20-25 sec
  • from Dark to Light ~ 20-25 sec
  • from Light to Classic < 5 sec
  • from Dark to Classic < 5 sec
  • from Classic to Dark ~ 15 sec
  • from Classic to Light ~ 15 sec

Isn't curious the time difference?

OS: Devuan GNU/Linux 5 (daedalus) (XFCE/xfce/xcb)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.39092 (Git) AppImage
Build type: Release
Branch: main
Hash: a65d05c6e495038168eefcba6a1e43218fbb3a20
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: Catalan/Spain (ca_ES)
Stylesheet/Theme/QtStyle: FreeCAD Light.qss/FreeCAD Light/Fusion

@probonopd
Copy link
Collaborator

Maybe it would help to check with strace what happens when it needs ~20-25 seconds. Is it trying to access some files then?

@MiqCG
Copy link
Author

MiqCG commented Nov 3, 2024

Maybe it would help to check with strace what happens when it needs ~20-25 seconds. Is it trying to access some files then?

Didn't know strace tool.
I have made:
strace ./FreeCAD_weekly-builds-39092-conda-Linux-x86_64-py311.AppImage
and there is no output after FreeCAD starting: no output while changing themes neither when opening a file.
Am I doing it correctly?

@probonopd
Copy link
Collaborator

You will probably need strace -f -eopen <...> and possibly sudo -e in front of that.

@MiqCG
Copy link
Author

MiqCG commented Nov 3, 2024

I have made
sudo strace -f -eopen ./FreeCAD_weekly-builds-39092-conda-Linux-x86_64-py311.AppImage
and the output has been different than previously but without output during or after the long theme changes.

On the other hand
sudo -e strace -f -eopen ./FreeCAD_weekly-builds-39092-conda-Linux-x86_64-py311.AppImage
and
strace -f -eopen ./FreeCAD_weekly-builds-39092-conda-Linux-x86_64-py311.AppImage
gave me errors and didn't start FreeCAD.

@benj5378
Copy link

I'm not sure if this is a bundling issue tbh. Seems like a coding issue: I have noticed it's only slow when choosing in Preference manager and not when choosing on setup start page.

@ChrisJones79
Copy link

Very long pauses (stalled, unresponsive) between any UI interactions. Open AppImage, chose Dark Theme, clicked New Parametric Part... 5 - 10 seconds of unresponsiveness.

OS: Ubuntu 24.10 (KDE/plasma/xcb)
Architecture: x86_64
Version: 1.1.0dev.39153 (Git) AppImage
Build type: Release
Branch: main
Hash: 3a7c8ed1c595c2a97116141589ed8f3fb0fd0bb5
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion

@kinghat
Copy link

kinghat commented Nov 10, 2024

Very long pauses (stalled, unresponsive) between any UI interactions. Open AppImage, chose Dark Theme, clicked New Parametric Part... 5 - 10 seconds of unresponsiveness.

OS: Ubuntu 24.10 (KDE/plasma/xcb)
Architecture: x86_64
Version: 1.1.0dev.39153 (Git) AppImage
Build type: Release
Branch: main
Hash: 3a7c8ed1c595c2a97116141589ed8f3fb0fd0bb5
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion

what plasma version? you need to be on 6.2 or higher iirc.

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

No branches or pull requests