Mapping a vbo may be long because the driver have to sometimes wait that the gpu releases it after rendering a frame. This causes a driver stall and may lead to an application stall too if it has only one main thread.
To make glMapBuffer return immediatly, you have to invalidate the vbo data calling glBufferData( …, NULL ) on the bound vbo. This way you reallocate buffer data for the current vbo that you can map almost instantly. The previous vbo data is completely lost and freed when the gpu has finished to use it.
If you have only litthe chunk of data to replace, I think it is better to use glBufferSubData in this case.
You can also use two vbos and ping pong between them: the first is used in the current frame rendering, the second is a copy of the first and is updated.
I must admit that it is not a very light way and it requires a little bit of work.
If you always need to update little continuous data subset, the glBufferSubData calls should be sufficient.
If you need to update non-continuous data subsets the glMapBufferRange is interesting as Eosie said but it requires the ARB_map_buffer_range extension. See: http://www.opengl.org/registry/specs/ARB/map_buffer_range.txt
Thanks all~~ ,I intent to use one vbo,because I used it to update a skeleton model’s skin,the vbo should be cleared every frame,so I think using glBufferData(…,NULL) is more effectively