View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018328 | MMW 5 | DB / Backup | public | 2021-09-21 12:54 | 2021-09-21 12:54 |
Reporter | drakinite | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.0.2 | ||||
Target Version | 5.0.3 | ||||
Summary | 0018328: Tracklist forEach function does not appear to use the same the same ICefV8Value object | ||||
Description | As discussed offline, the forEach tracklist function appears to create a new object each iteration, instead of internally utilizing the getFastObject function. The speed difference can be demonstrated with the following code: app.playlists.getByTitleAsync('Accessible Tracks').then(async (itm) => { let tl = itm.getTracklist(); await tl.whenLoaded(); let st = window.performance.now(); let ids = new Int32Array(tl.count); let i = 0; tl.forEach(track => { ids[i] = track.idsong; i++; }); console.log('forEach: ' + (window.performance.now() - st)); tl.locked(() => { let st = window.performance.now(); let ids = new Int32Array(tl.count); let song; for (let i = 0; i < tl.count; i++) { song = tl.getFastObject(i, song); ids[i] = song.idsong; } console.log('getFastObject: ' + (window.performance.now() - st)); }); }); | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in build | |||||