Is there a way to limit cpu usage

Now the phone performance is not good, plugging in a lot of data will consume more cpu. However, since I’m inserting data in the background, I’d like to ask if sqlcipher supports the ability to limit CPU usage. I’m willing to spend more time inserting data to reduce cpu usage

Hello @qwp767972675 - there is no way to directly limit CPU utilization by SQLCipher in the library. However, since SQLCipher is invoked by your application, there are various ways you can fine tune things to control utilization. Examples would include using long running connections, grouping inserts into transactioned batches, introducing periodic delays while process (e.g. thread sleep between inserts), and allowing concurrent reads with WAL mode. You should also read through the SQLCipher Performance Optimization documentation and ensure the guidelines are followed to minimize the overhead of SQLCipher in general.