It depends on which level (record level ,record field level or component
level) you are placing you peoplecode.
For example:
A page has a scroll area or a grid which contains some fields inside.
Now if you have people code in your save prechange event of the record level or
record field level, then it will get executed for all the active rows of your
scroll area. similarly save post change. the commit will happen after each save
prechange.
If you have got 4 active rows in your scroll and you have written same prechange
peoplecode in record level, it will be executed 4 times.
To avoid this you have to write this in a component level. Then it will get
executed only once