View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003025 | MMW v4 | Properties/Auto-Tools | public | 2007-04-27 11:10 | 2007-05-16 14:45 |
Reporter | jiri | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.0 | ||||
Summary | 0003025: Technical: Make SongTitleUsingMask() faster | ||||
Description | 1. Currently there are many choices made by using 'case' and 'if-else' statements. Instead, direct calling of methods should be used, i.e. something like: procedure letterA; begin if grouping then AddUnknownString( RemovePrefix(SD.Artist), num) else AddUnknownString( SD.Artist, num); end; procedure Empty; begin end; //... other letters handled here const procs : array [0..255] of procedure = {Empty, Empty, Empty, letterA {at position of ASCII 'A' letter}, .....}; and then in code something like: procs[ord(UpCase(char(mask[i])))] the syntax might need to be a little diffent, but the main idea should be clear. 2. IsCondTrue() doesn't support all new fields added (e.g. none of 'Z.' fields). This methods doesn't have to be implemented to be as fast as 1. 3. Quality (SD.Quality) field isn't present, should be added to all necessary places. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
Some remaining problems: 1. There's a very long initialization code (like procs[0] := Empty;), this should be an array of constants. For this reason procedures letterA(), ... would probably better be inside the main procedure, not class methods. 2. Two letter masks aren't handled the new way (like if (WideSameText (maskpattern, 'ZA') = True) then), they should be handled too - e.g. using letterZ procedure and a 'case' then. |