Skip to content

Commit

Permalink
Merge pull request #776 from reupen/fix-playlist-perf-regression
Browse files Browse the repository at this point in the history
Fix playlist view performance regressions
  • Loading branch information
reupen authored Jul 24, 2023
2 parents 814994c + 169440c commit 12ce2f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Change log

## 2.1.0-beta.3

### Bug fixes

- Performance regressions in the playlist view during operations such as sorting
were fixed. [[#776](https://github.com/reupen/columns_ui/pull/776)]

## 2.1.0-beta.2

### Features

- Indentation of grouping levels in the playlist view was made configurable.
[[#773](https://github.com/reupen/columns_ui/pull/773)]
[[#774](https://github.com/reupen/columns_ui/pull/774)]

The default configuration matches the behaviour of Columns UI 2.0.0.

Expand Down Expand Up @@ -98,6 +105,10 @@
left and right scroll buttons when scrolling left and right with dark mode
enabled was fixed. [[#737](https://github.com/reupen/columns_ui/pull/737)]

### Internal changes

- The component is now compiled with Visual Studio 2022 17.6.

## 2.0.0

### Bug fixes
Expand Down
6 changes: 3 additions & 3 deletions foo_ui_columns/ng_playlist/ng_playlist_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void PlaylistView::on_items_reordered(size_t playlist, const size_t* p_order, si
return;

clear_sort_column();
for (auto i : std::ranges::views::iota(size_t{}, p_count)) {
for (size_t i = 0; i < p_count; i++) {
const size_t start = i;
while (i < p_count && p_order[i] != i) {
i++;
Expand Down Expand Up @@ -78,7 +78,7 @@ void PlaylistView::on_items_modified(size_t playlist, const bit_array& p_mask)
clear_sort_column();
const size_t count = m_playlist_api->activeplaylist_get_item_count();

for (auto i : std::ranges::views::iota(size_t{}, count)) {
for (size_t i = 0; i < count; i++) {
const size_t start = i;
while (i < count && p_mask[i]) {
i++;
Expand All @@ -99,7 +99,7 @@ void PlaylistView::on_items_modified_fromplayback(

const size_t count = m_playlist_api->activeplaylist_get_item_count();

for (auto i : std::ranges::views::iota(size_t{}, count)) {
for (size_t i = 0; i < count; i++) {
const size_t start = i;
while (i < count && p_mask[i]) {
i++;
Expand Down

0 comments on commit 12ce2f2

Please sign in to comment.