The stock
ECU can adjust trim with fuel and timing and save those trims for ongoing driving. Recently I had issues with my knock sensor being set off by tappet noise, which caused the
ECU to change my standard ignition timing settings. It made the car run like a dog. Fixed the tappet noise and then reset the
ECU and now it goes like a shower of shit.
But aftermarket ECUs dont really work like that. The tuner can add compensation maps in more advanced aftermarket ECUs for all sorts of conditions(temp, knock, O2, wideband, etc...) but they are adjusted in real time as driving conditions and sensor inputs change. They dont really "save" or change the maps themselves.