2

I need to search a varchar column of SQLite database for a word from my app and show the results in a listview. Currently I'm using Mensa library Mensa Github Link because of the speed it offers for even very very long texts. In another project I've also used Filterable alongwith a custom ArrayAdapter which filters listitems based on text matching. I was wondering whether i could replace Mensa usage with the Filterable approach without compromising on the search efficiency because Mensa library increases the APK size by 3.37 MB

zulkarnain shah
  • 971
  • 9
  • 20

1 Answers1

1

I've checked the jar file of the Mensa library, and it is that big because they include their animal.keywords testing database inside the jar.

Rename the mensa-1.0.1.jar to mensa-1.0.1.zip, and open it with your archive manager. Navigate to com/dell/mensa/testutils/ and delete the animals.keywords file. Now rename it back to mensa-1.0.1.jar, and continue using it. The file should be 104.5 kB now.

Daniel Zolnai
  • 16,487
  • 7
  • 59
  • 71
  • Wow , keen observer i must say. I never looked into the jar file.!! But I'd still like to compare the difference in efficiency between Filterable and Mensa, though I like Mensa a lot. Thanks for the quick answer. I've implemented and tested the app again, it works ! – zulkarnain shah Jan 28 '16 at 11:34
  • 1
    As Mike M. said, you should just test it yourself :) This is quite a specific use-case, chances are you are the first one doing it. – Daniel Zolnai Jan 28 '16 at 11:35