OnUpdate basic question

I built a trace based animator using jMonkey’s awesome Cineamtics I am attempting to implement a way to read that trace sequentially (buffered reading) in order to make the trace reading smoother (rather than reading one large chunk and putting it in Cinematic’s buffer).

So the question I had is that I need to do some basic calculations within cinematics based on where the time reader is in order to know what time to read more from the trace file and the place to do so is within the onUpdate() method. The question that always intrigued me is that wouldn’t that be VERY expensive to call that method like 30+ (depending on the frame rate) in one second? I see in the wiki that it’s always being used but is that efficient?

Can anyone please explain if it’s expensive or not to put code inside onUpdate() (although this could be very basic in jME) but I can’t figure out whether I should use it or not to access events/variables within the cinematic class.

In the wiki it’s mentioned to use it wisely. How can I base my assumption on what’s costly and what’s not

I guess it would depend on what you are doing in the onUpdate() method.