As end user I want to see all relevant data at once, as the typical use case is 
that either a revision control tool (or untar, unzip,...) is modifying a lot of 
files at ones. Therefore I created `document_check_disk_status_others(.., 
gboolean force)` which can be called when re-entering the application.
During typing in a document however, the load on the CPU should be as minimal 
as possible so only the current document will be checked with 
`document_check_disk_status(.., gboolean force)`. The latter may _avalanche_ to 
check all others too, if for the first time a change is detected. Why is this 
needed?

The information to display is not static, nor similar for each document: 
1. One file maybe saved by the user, while the others are handled later on. So 
the number of modified (or deleted) files will be decreased every time, for 
each monitor widget.
2. The information is not similar for each monitor widget, therefore it needs a 
macro `foreach_document_skip(i,skip)` to list all other names, see screenshot 
below.

The consequence is that we need to disentangle two tasks: collecting the 
information first, then displaying it as a second action later. Making a list 
and modifying it later on, becomes quite error prone, giving the dynamic change 
above: it is just easier to iterate of the documents while constructing a new 
or updated monitor widget.

Will the widgets be updated every time? No, only when the a change is detected, 
for which I use the boolean variable `modified_since_roundtrip`. I worry about 
wasting needless CPU cycles too, see an earlier problem I 
[solved](https://gitlab.gnome.org/GNOME/eog/-/commit/30a5007b3c4dea76eafe176bdf3b7411c1e2d2f0).
Mind that it is still work in progress (WIP), I'll only send a PR once, to my 
knowledge, no new bug are added and the functionality is complete.


![geany_disk_summary](https://github.com/geany/geany/assets/7198614/222f40c4-6264-4d98-ab7b-ff73944e53c6)



-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3711#issuecomment-1848949146
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/3711/1848949...@github.com>

Reply via email to