Sync requires 1.5 - 2 Kb (1.5Kb on average) of RAM per each file and folder it manages depending on the actual path length.
Every file and subfolder in its path (relatively Sync's share's root) is kept in a database. The bigger folder tree you have, the more memory will be required to build database. Sync always keeps the whole tree of files in memory for fast operations.
It's important to understand that all file operations are also kept in the database. Even if the file or folder is already removed from the share, they are still stored in DB, marked as "Deleted".
That is why the DB is constantly growing as you use share and files activity is going on there.
If there is not enough RAM on your device to keep Sync running, OS will unload some of Sync's data to a swap file, which will cause the whole device and Sync to run extremely slowly. Sync may also be forcible closed due to lack of memory on the device.
To avoid this situation, extend the physical memory of your device. The only way to make Sync use less RAM is to remove the biggest folders from Sync from all peers, and share the folder again. As you remove, the database will be also deleted. As you add it back, new database will be created (Sync will have to index the files) and it will only keep the current set of files.