The line df = df.groupby(['track', 'pitch']).apply(fix_overlapping_notes) increases computation time by at least 100x. This is mad. For now, I'm just going to bypass this by adding a flag to skip the check (we decided not to enforce this), but I think we will learn something if we try to profile the code and understand why it's so slow.
The line
df = df.groupby(['track', 'pitch']).apply(fix_overlapping_notes)
increases computation time by at least 100x. This is mad. For now, I'm just going to bypass this by adding a flag to skip the check (we decided not to enforce this), but I think we will learn something if we try to profile the code and understand why it's so slow.