We measure the dynamics of the thermo-optical nonlinearity of both a mode-gap nanocavity and a delocalized mode in a Ga$_{mathrm{0.51}}$In$_{mathrm{0.49}}$P photonic crystal membrane. We model these results in terms of heat transport and thermo-optical response in the material. By step-modulating the optical input power we push the nonlinear resonance to jump between stable branches of its response curve, causing bistable switching. An overshoot of the intensity followed by a relaxation tail is observed upon bistable switching. In this way, the thermal relaxation of both the localized resonance and the delocalized resonance is measured. Significant difference in decay time is observed and related to the optical mode profile of the resonance. We reproduce the observed transient behavior with our thermo-optical model, implementing a non-instantaneous nonlinearity, and taking into account the optical mode profile of the resonance, as experimentally measured.