Ecm backup battery
As long as you like. There's certainly after a long term removal a "relearn" effort for ECM but if you've an FSM it's an easy read. Clock and radio memory will be gone.
No back-up battery. Data loss? Yes, but easily recovered. What are you wanting to do?
The tune programming will not be lost. The learned values (like long term fuel trims) will be lost, however the computer will relearn them in a few miles. I think it is a good idea to disconnect the battery periodically in order to lose the learned values. Mine was running good, but changed after a tank of maybe bad gas and mileage went down 4 or 5 mpg. I disconnected the battery then reconnected it and immediately it started running better and has been good since (over a year).
You may also lose the radio presets and time of day. To me that is not a big deal.
If you are still worried about it they make a small adapter that has a 9V battery that connects to the cigar lighter and is supposed to preserve settings while you disconnect the car's battery. I used one once, but it is almost more work than not using it.
Good luck.

I was afraid to mention that "it could be beneficial" but I thought someone might call BS
Now I just have to agree, a friend actually does this every spring when taking the car out of storage and his is on a Tender all winter.















