Did a few testing overnight, the NES update likely changed something that's impacting the max number of games. I used to have a pack with 507 games, it was loading without any issue (except when closing the app).
Using dichotomy to speed up the process, I found that there is a new limit now at 455.
After that, at 456 games, the app would launch but no game would be playable (including the stock ones), starting a game would crash the app.
Adding even more games, displaying any game description with X would crash the app and no game would be playable.
Adding even further games, reaching 507, the app won't even launch anymore and would crash before displaying the game list.
I'm ok with having less games, but just sharing the info in case it's helping anyone.
I only have custom packs for NES and SNES, so haven't tried the other apps, but it's not causing any issue with the SNES pack, this new limit is only showing with the new NES update (6.4.0).
Thanks for the report.
I didn't think it would only be a lowered limit with SNES and GB/GBA, but its good to have confirmation.
I guess I havent posted my theory publicly on this thread, so I may as well now. Do it once for reference, so I dont have to keep repeating it.
I am fairly certain that the main issue with the soft game limit is... Images. Each game adds 2 images to memory. For SNES for example, one is 512x357, and one is 400x300. If you understand how gaming textures and RAM works, you would know that compression formats for a image are irrelevant. All such images are loaded into RAM in a raw 4 bytes per pixel format. And recently I have done some work on systematically decompiling the lua scripts that handle the menu, finding that yes, BOTH images are loaded into RAM when the app is first loaded.
So... doing some math you would find that a the SNES images take up 0.73MB and 0.48MB. That's 1.21MB per game. 670 right now is the exact absolute max I can load into SNES without the app refusing to load at all. So... 1.21MB X 670 = 810.7MB.
Now, while the Switch has 4GB of RAM, that doesnt mean that all of it is allocated and available. I don't know the specifics of its access limits. But I can say how coding is often done. In coding, you allocate a fixed amount of memory for your data. Generally above your theoretical maximum needs, but not SO FAR above that you are hogging and wasting too much RAM. 900-1000MB may be that max (assume the other 90-190MB are being used by other things of the app. Menu images, code, etc).
Now here is why GB/GBA seems to have a lower soft limit.
GB/GBA box images are 512x512. Not 512x357. One image takes up more RAM that SNES/N64 counterparts. 1.04MB instead of 0.73MB. So if you go by 810.7MB being the RAM limit for images... thats comes out to a theoretical soft limit of 533 for GB/GBA.
For NES the the box images are 359x512. Almost the same footprint as SNES. But I will point out that 670 is the max I could get to load in the app at all. Soft caps... can be defined differently. Like for example, 280 is the limit I added to CaVE simply because after that the save file can start having issues due to tracking sorting among other things. I think around 350-400 games when I was making my SNES Preset Database, is when I first started noticing instability of the app. Crashes here and there when loading the app or games. Maybe lag. That kind of stuff.
This is as far as I have cared to theorize and research this. But I can say that there is a test someone might be able to do to see if this holds true. That test being... to make a copy of their titlesdb, and remove all the "details_screen" lines. IDK, probably even just mass replacing the text "details_screen" with something else that the app will ignore would virtually delete the line. I know from viewing the decomp that if the line is not found, the app will simply ignore it and carry on. The app would end up loading half the images, and thus should have more RAM available to run stable. The only downside of course is that the screen where the details screen image would be displayed would be messed up.
This is the most I will ever help people with such oversized databases... But yea. If that works, that could be viable if you want more games and dont mind losing the title screen images. Or... you could try using smaller resolution images for your box art. Like 256x178 or something. Again, if you are fine with the trade off.
That said... don't. You dont need 9,001 games in your databases. Just add what you know and love, or what you think you might like and ACTUALLY PLAY. Seriously, if later you think of a game to play and its not in your database, you can then just add it with CaVE. This "one-and-done" mentality some people have is just lazy...