Bug 343371 - Whole project is refreshed when file in project is changed
Summary: Whole project is refreshed when file in project is changed
Status: REOPENED
Alias: None
Product: lokalize
Classification: Applications
Component: project management (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
: 368842 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-27 15:20 UTC by Vit Pelcak
Modified: 2023-02-13 09:41 UTC (History)
5 users (show)

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 Vit Pelcak 2015-01-27 15:20:53 UTC
I use pology for automation of various tasks. As I have project of whole Czech translation in Lokalize opened, during run of pology, when translations are being modified, project is refreshed whenever file is changed. That can cause quite a lot of refreshes during that automated batch processing. That is rather annoying.

In Lokalize 1.5 this was very smooth and only changed files were refreshed (or whole refresh was so smooth that it was invisible).

Reproducible: Always
Comment 1 NSLW 2015-10-31 07:05:16 UTC
I confirm that too and give case to reproduce:
1) open e.g. kf5-based-stable project
2) the project view is refreshed
3) open not translated file in kf5-based-stable
4) open translated file in kf5-based-trunk for synchronization
5) synchronize first file
6) save first file
7) close first file
8) you return to project view
9) project view is refreshed, which is unwanted and annoying
Comment 2 Adrián Chaves (Gallaecio) 2018-05-27 11:00:55 UTC
*** Bug 368842 has been marked as a duplicate of this bug. ***
Comment 3 Adrián Chaves (Gallaecio) 2018-05-29 20:57:10 UTC
This issue seems to have been introduced by the fix for https://bugs.kde.org/show_bug.cgi?id=342959
Comment 4 Simon Depiets 2018-08-29 02:10:24 UTC
Git commit b6f3151185b746092ad1b2e2ede5130e02c9dc02 by Simon Depiets.
Committed on 29/08/2018 at 02:10.
Pushed by sdepiets into branch 'master'.

Fix project model issues on file changes

Summary:
This revision fixes some issues with the Project Model refreshes
- Project view jumps to new (random?) file after closing translation file https://bugs.kde.org/show_bug.cgi?id=348757
- Whole project is refreshed when a file is changed https://bugs.kde.org/show_bug.cgi?id=343371
- Moving or adding a file/folder into the project root will trigger a bug where only that file/folder is displayed

It mostly fixes behaviors which are applied to directories while they shouldn't (like cache requests for directories that return empty values, or unnecessary full regeneration).
Related: bug 348757

Test Plan:
I've tested the following test matrix :
* Move/Add/Remove/Save   x    File or Folder
* Within the root folder, within subfolders (same or different), between the root and a subfolder

This is for a .po project architecture, I would be interested to know if the behavior doesn't create regressions with a .po/.pot or other architecture (which might be more buggy to begin with).

Reviewers: ltoscano, #localization, aacid, mlaurent

Tags: #localization

Differential Revision: https://phabricator.kde.org/D15049

M  +29   -13   src/project/projectmodel.cpp

https://commits.kde.org/lokalize/b6f3151185b746092ad1b2e2ede5130e02c9dc02
Comment 5 Vit Pelcak 2023-02-13 09:41:51 UTC
Hello.

I need to reopen this issue as I do not see an change in the latest Lokalize still.

Change of just single file triggers the whole project refresh.

Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

Lokalize version 22.12.2