osx - NSScrollView with massive contentView causing terrible performance on scroll -
i'm trying draw large waveform/graph nsview
placed inside of nsscrollview
. way, user can scroll horizontally , parts of @ time.
the waveform view can large (technically, infinitely wide).
if entire waveform drawn, scrolling performance unusable. i'm unsure why nsscrollview
attempting redraw entire view rather visible rect - suspect need implement logic myself.
what efficient way implement have scrolling experience?
you tile contents of scroll view several small nsview
instances, each 1 representing small part of graph , placed right beside 1 another.
however, not sure extent views clipped off-screen still consume resources , affect performance.
a better apporach similar above, relying on built-in functionality of collection view. machinery takes care of displaying cells should visible (not clipped scroll view).
Comments
Post a Comment