There are 20,000 strings like this always loaded into memory and i want to do a patter matching on them, for example a request comes in to find string 'NAME' in the memory, so it will be like a wild card match, i should find following two records in the above sample. [MYNAMEISEARLHIKKI, MYNAMEISABCDABCD]
What will be the memory implications and performace implications of storing 20,000 records which are 150 to 200 character long and doing a find pattern matching on them, can you give me a simple code to load strings into memory
Actually not a lot less. It's 64,000,000 bytes, and the JVM has a default of 64MB (67,108,864 bytes). However, the JVM also needs memory for its default footprint (classes etc) and other objects, and will therefore quite easily exceed the 64MB. Therefore, you will need to specify a larger maximum heap size.