precompile database as json, improve performance