Exactly.
Having a sliding window to compute the histogram wouldn’t work in this case, because these are ‘weighted’ histograms, where the weights depend on the value of the central pixel, which are then changing drastically at each pixel.
So we cannot easily deduce the histogram of neighborhood for position (x+1,y), knowing the one at (x,y).
The best we could do is that in the case the central value stays close to the previous one, then speed up a little bit the histogram computation. But I’m afraid the tests it adds are not worth the gain we get.