function calls functions that make queries to the database within loops.
This ruins the performance of the system significantly.
The queries should be reworked, and the code should be moved to GN3 since it does database access.
enable the fetching of the menu items from GN3. They also report in case of any errors fetching the data from the server.
There is still a need to remove the code from GN2 but it might be a while since it is seemingly used in more than one place.
move the menu generation code to GN3, and have GN2 only handle the display.
I have also made changes to some of the functions to optimise the queries to the database.
The remaining functions have proved really difficult to detangle and optimise, so for now I will mark this issue as done, until such a time as the performance of the menu proves to be unnacceptably slow.