Issung / GChan

Scrape boards & threads from 4chan. Download images, videos and HTML if desired.
GNU General Public License v3.0
65 stars 10 forks source link

Refactor CreateNewTracker to improve efficiency when loading data from DB #36

Open Issung opened 1 year ago

Issung commented 1 year ago

In GChan/Utils.cs CreateNewTracker(LoadedData data) a tracker is made by creating one from the url from the db, then setting the properties one by one, this looks nasty and will also be spamming NotifyPropertyChanged events one by one to the UI. This will be impacting startup time greatly when the user has a lot of threads saved.

There is a TODO in the code:

// TODO: Should be making trackers based on the LoadedData (pass loadeddata to constructor).
// Rather than making them and then loading them with more data.
// This would help app-startup ui responsiveness as it would reduce the notify property changed spam greatly.

Will require some refactoring of how trackers get made, not much.