[okular] [Bug 463647] New: Slow start on network mounts because of image icon lookups + may broken UI

2022-12-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=463647

Bug ID: 463647
   Summary: Slow start on network mounts because of image icon
lookups + may broken UI
Classification: Applications
   Product: okular
   Version: 22.08.3
  Platform: Ubuntu
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: okular-devel@kde.org
  Reporter: mi.sel...@hotmail.de
  Target Milestone: ---

Created attachment 154918
  --> https://bugs.kde.org/attachment.cgi?id=154918&action=edit
wrong icons in UI

SUMMARY

Preamble:
I'm using okular to view PDF files which are on a samba network storage. The
storage is mounted via CIFS to the local filesystem. I'm discovered that
sometimes it will take several seconds (20 or more) to open and view small PDF
files. 
The waiting time increases when I'm connected via VPN (OpenVpn, Wireguard, ...,
doesn't matter) and it will take more than a minute to display these files.
After that I was looking for some bug reports and found some old ones with
okular and CIFS, but they are solved or 9 years without a message. So after
some weeks I started testing again.
- (Windows 10+11 shows the PDF files nearly instantly.)
- Copying the file to the local storage and opening files there is way faster,
than opening okular in the mounted storage path.
- Evince on this machine also shows the files instantly.
-> so the network connection and CIFS are working fine

- Then I discovered, that PDF files on the CIFS mount path will open faster
when there are no sub-directories.
- The other way around: opening files in multiple subdirectores paths will
cause long waiting times in okular.
- Then I discovered that the same thing is happening when no file is selected
at all and okular was simply started on a CIFS mount path: long sub-path ->
long starting time for okular
-> My thought: okular is looking for files in the current directory, may in the
whole path.
-> So I used some tools to track the accessed files of an okular program start.

The problem:
The annotation widget module of okular is looking for icon images in the
current working directory when they are not included in the stamp.svg or loaded
via the theme.
On each start of okular, okular will look for some images with a set list of
image extensions in the current working directory, when the icon/image name was
not previously cached via an id in some SVG file or was loaded as icon via the
theme.
e.g. 
- there is no id 'bookmark-new' in the stamp.svg or the icon theme
-> okular will look for 'bookmark-new', 'bookmark-new.3fr', ... [long list]
..., 'bookmark-new.png', ... [...].tiff, ...svg, ...
 in the current working directory. There are 66 lookups for this filename. This
happens on each start - for each okular instance.
-> the same goes for 
--> 'help-about', 'kde', 'okular'  (see
https://github.com/KDE/okular/blob/master/part/annotationwidgets.cpp#L430)
-> if you open the annotation settings there will be lookups for more files.
see the list in
https://github.com/KDE/okular/blob/master/part/annotationwidgets.cpp#L366

-> These icon file lookups will happen when the class PixmapPreviewSelector
will load some icons files. Each time an instance is created and icon names
added.
-> Massive slow down on 'slow' data storage drives / mount points.
-> If there are files with this names, this will break the UI (See attachment).

STEPS TO REPRODUCE
As it is way simpler to recreate and test a broken UI, as to setup some 'slow,
cifs mounted, long sub path PDF files'  -> I will go with this, as it is the
same bug. But there are more steps.

File Lookup:
1. create / download some small png file, and copy+rename it to 'okular.png',
'kde.png', 'help-about.png', 'Note.png', 'NewParagraph.png', 'Paragraph.png',
'Insert.png', 'Help.png', 'Key.png', 'Comment.png'
2. open up a terminal/console, change the directory to the one containing the
files from step 1
3. start okular from the terminal/console in this path
> this will load access some of the files
> you can check this e.g. with 'strace' or use she tool from the answer of this 
> question:
> https://unix.stackexchange.com/questions/18844/list-the-files-accessed-by-a-program
>> command: tracefile okular | grep -E '\.\/'

Broken UI: (see attachment)
4. open a PDF file
5. may enable/show annotation tools
6. open stamp list

To recreate the slow okular program start follow this procedure:
1. mount some samba net storage with CIFS
> mkdir /smb_cifs_mountpoint
> mount -t cifs -o username=,uid=$(id -u),gid=$(id -g) 
> ///share "/smb_cifs_mountpoint"
2. create long path:
>  mkdir -p /smb_cifs_mountpoint/a/b/c/d/e/f/g/h/i
3. change directory: 
> cd /smb_cifs_mountpoint/a/b/c/d/e/f/g/h/i
4. start okular: 
> okular

OBSERVED RESULT

- on CIFS mount: long waiting time to view/open a PDF file
- broken UI (wrong icons) when file names exist on current path

EXPECTED RESULT


[okular] [Bug 463647] Slow start on network mounts because of image icon lookups + may broken UI

2022-12-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=463647

mi.sel...@hotmail.de changed:

   What|Removed |Added

 CC||mi.sel...@hotmail.de

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 463647] Slow start on network mounts because of image icon lookups + may broken UI

2022-12-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=463647

mi.sel...@hotmail.de changed:

   What|Removed |Added

 Attachment #154918|0   |1
is obsolete||

--- Comment #1 from mi.sel...@hotmail.de ---
Created attachment 154919
  --> https://bugs.kde.org/attachment.cgi?id=154919&action=edit
wrong icons in UI (updated image with more comments)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 399360] Okular CHM cannot open any chm file and input chinese

2022-12-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=399360

--- Comment #12 from Bug Janitor Service  ---
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 399030] Can't print 4 pages per sheet and then odd/even for double-sided printing

2022-12-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=399030

Bug Janitor Service  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |WORKSFORME
 Status|NEEDSINFO   |RESOLVED

--- Comment #7 from Bug Janitor Service  ---
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 398945] Stamps/icons appear pixelated in Stamp Properties window

2022-12-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=398945

Bug Janitor Service  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |WORKSFORME
 Status|NEEDSINFO   |RESOLVED

--- Comment #5 from Bug Janitor Service  ---
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!

-- 
You are receiving this mail because:
You are the assignee for the bug.