bbappserver / hydrus-userpatch

Community patches for Hydrus, a personal booru-style media tagger that can import files and tags from your hard drive and popular websites. Content can be shared with other users via user-run servers.
http://hydrusnetwork.github.io/hydrus/
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Create job observer to publish status updates. (Observer Pattern) #1

Open bbappserver opened 5 years ago

bbappserver commented 5 years ago

A job should not be responsible for publishing its own status update, the UI thread should instead observe active jobs occasionally and update itself.

Otherwise the GUI will lock up when many jobs complete in quick succession, as the UI is trying to redraw itself way more times than it actually need to.

https://github.com/bbappserver/hydrus-userpatch/blob/a9cc268bbfa88bac476e98602f6d5b22ddbc18cb/include/HydrusDB.py#L568