Should the results for a new MAF be instant, or does the computer take some time to learn before improvement?

Here's the background:
Had a problem with surging idle at cold startup and stalling in driveway. Saw that charge air pipe was broken. Replaced it. Some improvement but idle still surging and intermittent stalling at stop. Checked for other vacuum leaks -nothing obvious. Plugs were carbon fouled (rich), so I though maybe the MAF. Replaced that with a nearly-new one but no change after starting a few times in driveway. Started it next day and surging idle gone. Does this make sense?