View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0020113 | MMW 5 | DB / Backup | public | 2023-06-22 13:56 | 2023-10-03 12:51 | 
| Reporter | Ludek | Assigned To | |||
| Priority | immediate | Severity | major | Reproducibility | always | 
| Status | closed | Resolution | fixed | ||
| Product Version | 2024.0 | ||||
| Target Version | 2024.0 | Fixed in Version | 2024.0 | ||
| Summary | 0020113: Scanning is much slower in 5.1 (regression) | ||||
| Description | Tested with LowLander's database created prior to 5.1  (300 K tracks) 1) Scanned folder with 102 files in 7 seconds 2) Updated to 5.1.0.2806, waiting for DB upgrade to finish 3) Deleted the 102 files from the database 4) Scanned the same 102 files using 5.1.0.2806 => it now took 49 seconds!! i.e. scanning in 5.0.4 is 7 times faster!  | ||||
| Additional Information | [Ticket # 5934] | ||||
| Tags | No tags attached. | ||||
| Fixed in build | 2810 | ||||
| 
		 | 
	The culprit is this DB trigger added by Michal in course of fixing 0019830 and 0016714 | 
| 
		 | 
	
	Particularly this part of the DB trigger: ' UPDATE Albums SET Rating = (SELECT COALESCE(ROUND(AVG(Rating)), -1) FROM Songs WHERE (Songs.Rating>=0) AND Albums.ID=new.IDAlbum);  | 
| 
		 | 
	
	Problem is, that we need to fill this info too, because of 0016714.  Fix will be harder to do, as I will need to fill the info different way later and handle all possible situations including premature end of app run.  | 
| 
		 | 
	Fixed in build 2810. | 
| 
		 | 
	
	Verified 2817 Based on several concurrent restart of scans MM 5.1 is aprox 10-15% slower than MM4, which is reasonable due the number of improvements. Further optimization shoul dbe added as new bugs in case of need.  |