SQLite is the nicest solution, but if you only need a decimated graph of the full data (no zoom in for fine scale), then a quick fix is a “self-compressing arrayâ€. An example taken from a past project:
Self Compressing Array.zip
This automatically decimates the data to keep the total under a fixed size. Never allocates memory except at initialization. But you can’t zoom in; for that and other cool features you have to go with SQLite.