Fast fourier transform in sliding window of a signal

I would like to detect the change of the frequency content through a real signal using sliding window as shown in following figure.

Fixed size sliding window on a signal

However, applying fourier transform is costly for windowing operations. For example, at the above case assume window size is 50 samples; I need to calculate fourier transform 950 times. I wonder is there any mathematical workaround to shorten the calculation time.

I would really be happy if I gain some calculation time. Thanks in advance!

• I wonder if you can use memorization of some sort from previous calculations on the same samples. – Q the Platypus May 24 '16 at 8:55
• @QthePlatypus, if I would calculate average value in the window, it is easy to use previous calculation. But I have no idea how to do this for fourier transform – Lati May 24 '16 at 9:12
• This may be of help dsprelated.com/showarticle/776.php – Q the Platypus May 24 '16 at 9:24
• @QthePlatypus, thank you for the link! I will try to understand how I can use it with a fourier transform library. – Lati May 24 '16 at 11:09
• @QthePlatypus, I have tested the equation at the link, that works only if you keep your signal size fixed. I wonder if there is also a way if signal is zero padded before fft? For example if you have a signal [1, 2, 3, 4, 0 ,0 ,0,0], how to calculate fft of the signal [2, 3, 4, 5, 0, 0, 0, 0]? any help is appreciated! – Lati Jun 9 '16 at 13:13