Memory fragmentation affect sqlite3 performance -


i have following sequence in application.

  1. download contacts mobile phone using bluetooth's pbap.

  2. writing these contacts custom database created sqlite. configured sqlite zero-malloc option , given 1mb buffer use heap, , using other optimizations row insertions in single transaction, pragma journal_mode = memory, pragma synchronous = off , pragma count_changes = off.

  3. after writing database reading contacts database , creating speech pronunciations contact names. speech pronunciation algorithm using dynamic memory allocations too-much.

now, if repeat above 3 steps, 3 times in sequence in single execution getting following results.

1st time : contacts downloaded in 5 sec, database created in 10 sec.

2nd time : contacts downloaded in 5 sec, database created in 60 sec.

3rd time : contacts downloaded in 5 sec, database created in 500 sec.

now removed speech pronunciation creation app , repeated 3 times again. result

1st time : contacts downloaded in 5 sec, database created in 10 sec.

2nd time : contacts downloaded in 5 sec, database created in 10 sec.

3rd time : contacts downloaded in 5 sec, database created in 10 sec.

i found issue pronunciation creation, memory got fragmented while creating pronunciations , affected performance of sqlite next time onwards.

but, configured heap sqlite , enabled memsys5, fragmentation affected.

please give suggestion solve issue.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -