While pressing Save Button how many times Save Pre Change and Save Post Change triggers and when does the commit occur?

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