Unsolved 2-3 secs Delay when SqlRecord is Executing
-
Hi,
What kind of database are you working with ?
What driver are you using ?
What size is it ? -
it is an sqlite database on Embedded Linux
-
What size is the database ?
What are you using as storage ?
What are the spec of your device ? -
- The size of DB is it can accomodate up to 1 TB of records
- I did not understand. Can you brief more ?
- 512MB ram, dual core processor
-
@Beemaneni-Bala said in 2-3 secs Delay when SqlRecord is Executing:
it is an sqlite database
In addition to @SGaist's questions, do you have any other processes using the database at all?
-
- What is the current size ? Also, you plan to work on sqlite files in the TeraByte size ?
- What are you using as mass storage device ? SSD ? Mechanical hard drive ? etc.
- What speed ? Architecture ?
-
I have my threads running apart from this. this happens when i try to insert a record, it blocks all threads as well and it takes 5 secs to come back from exec()
-
- It is a fresh database of 20 to 30 KB. and we limited the size to some 300 to 400 MB file.
- Hard drive with 256 MB.
- 1GHz arm processor
-
What do the other threads do when you are blocking them before writing the record ?
-
The other thread shud have the serial communication that interacts with the other module.Even that is blocked during that time. Does exec() function runs in loop until it saves all the records. ?
-
There are 2 threads one is main and other is communication thread. So database manager is a member of main thread. So when comm thread emits a signal, it is caught in main thread and the records are inserted into database. Thats how it goes for now
-
Are you doing anything heavy in the GUI thread ?
-
Nope..Onr thing i dont understand is only at that point (when exec() is called ) alone i have that lag. If i just comment that , it works perfect.
-
Nothing else is accessing that database ? Even an external process ?
How is insertHealthStatusDetails called ?
-
So to answer all the questions...Here i go sir.
I have created a test app for inserting a record into database. I compiled for device and i ran on that and it gives me same results.Hence i am not worried about all the processes and threads for now.
Am i correct ? -
Looks like there's something else at play.
I'd check with a profiler to see where's the bottleneck.