How to speed up the process when inserting 1000's of records into sqlite using HTML5

后端 未结 5 1998
[愿得一人]
[愿得一人] 2021-01-13 09:58

Iam new to developing HTML5 applications. In this I want to insert 1000\'s of records into sqlite database using HTML5. This process is very slow. How to use BEGIN/COMMIT be

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 10:20

    This issue is that you're using a separate transaction for each step, instead of reusing it, hence why it's running poorly.

    db.transaction IS a transaction, so no BEGIN/COMMIT needed.

    Try this:

    
    
    
    
    
    
    
    Status Message

提交回复
热议问题