I'm pretty new to STL, and I am having a problem with initializing a static map. I am trying to use this to refer to a string by ID. When the map starts to get large (~3000 entries), it takes forever to build.
Galik- thanks, I did, but there will actually be several maps ~3000 strings long. I don't think I can spare the loading time.
Spartan- yeah, I thought about that, but its like a ~really~ long time- like 10 mins. I think I'll be switching over to using SQLite, but still seems odd!
Databases are created for a reason isn't it. When your program has input in the thousands or even millions, they are the saviours. For C/C++/Java or whatever program we 'play' with memory and memory is limited, so usually we load data from the database to our program memory.
If your business needs require to show ALL the thousands or even millions of data, then some design is needed. Most ppl use paging concept as in serve a page of say 25 records first and then upon click Next server the other 25 records etc.
At some point in time, we need BOTH database and programming language for some business requirements. In fact a lot of businesses uses this simple combination.
SQLite is a good choice. Not as complete as commercial database like Oracle,DB2 etc, it is good enough and hey Google Android SDK uses SQLite too! :P