If you're binding a new vertex array for each individual line, then that is certainly your problem.  I once had an application where I changed vertex buffers a couple times per object.  Maybe 50 bindings, and the program was too slow to be usable.  The problem had to be solved with interleaved vertex arrays/VBOs.  350,000 vertex buffer bindings, and I see why you have performance issues!

You can solve this by batching more of your edges in a single vertex array.  If you batched all of them into a single vertex array, I'd predict somewhere around 5-15fps.  Because you're still drawing these things with vertex arrays--i.e., transferring all the data across the graphics bus each frame.  Even if you have to duplicate vertices, you'll still be far better off.

AFTER you've done this, to make your application realtime, you can then transition to VBOs, where you'll transfer the data once.  I recommend using the OpenGL.arrays.vbo class.  VBOs are the "best" solution, and will even let you do fancy stuff like update the data (or only a part of it).  An easier solution is using display lists--although they're technically depreciated in versions of OpenGL that no nobody likes. 

After this, you'll probably be around 50-70fps.  Keep in mind that 350,000 lines is a hefty load, because each line (internally) requires two triangles. 

On Thu, Jan 13, 2011 at 3:49 PM, Chris Barker <Chris.Barker@noaa.gov> wrote:
On 1/13/2011 3:50 AM, Alejandro Segovia wrote:
> I find it puzzling that you didn't notice any speedup at all after
> doing this. Python lists are just linked lists,

no, they are not -- they are internally regular C arrays.
But they are resizable, which implies they are either linked lists or array lists--because I doubt the pointers are copied over to a brand-new array just big enough each time a single element is added or removed.