wrt performance issues:
The database code does not take into account that EEPROM writes are often done in pages (chucks of bytes, powers of 2, 16/32/64 etc)
If you need to updat 7 vars in 1 page you can do that in 7 writes but also in 1.
Seems that you did it per byte.