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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -