andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.74k stars 521 forks source link

Slow run #568

Open nehalasim opened 6 months ago

nehalasim commented 6 months ago

Hi, I'm in the process of developing a census surveillance system using SQLite storage in React Native. However, I'm encountering a performance issue. Initially, when I log in for the first time, everything is quick, and generating 40 rows of records on the screen works fine. The problem arises when I log out and attempt to log in multiple times to check the system – it becomes progressively slower. After a couple of attempts, loading just 40 records takes more than 40 seconds. The slowdown starts from the third attempt.

DOES ANYONE HAVE A SOLUTION TO THIS ISSUE? Any advice or assistance would be greatly appreciated.

even this below function db.transaction( function(tx){ tx.executeSql( "select * from user where userID='"+userID+"' and password = '"+userPass+"'", [], function(tx, result){

  var lengt = result.rows.length, i;