Good morning,We have been using sqlite3_blob_open in the function below.When I 
profile the application using Very Sleepy I notice that sqlite3_blob_open is 
one of he biggest consumers of CPU time. Is it possible to find a faster 
alternative to sqlite3_blob_open? Thank you
 
 
unsigned long *cIntersectingDedupe::GetSubGraphBlob(sSUBGRAPHINFO 
*SubGraph_,int *Size_) {
int Size;
sqlite3_blob *Blob;
unsigned long *RetVal;

/* The new function sliqte3_blob_reopen() may be a bit faster? */

// Grab a BLOB and put it into a unsigned long buffer. As the BLOB contains 
record numbers,
// we will never see a value of zero. Thus, we use 0 to mark the end of the 
array.
//
// Note that we can have BLOBs of size 0, though. If we used DistillSubGraph to
// dedupe the subgraph, some records will be consolidated into others. The
// donor record's BLOB gets zapped because all of it's BLOB was rolled into the
// donee (All your BLOB are belong to us!)
0.08s 
sqlite3_blob_open(SubGraph_->Database,"main","AggregatedData","Rows",SubGraph_->IteratorPos+1,0,&Blob);
0.42s Size=sqlite3_blob_bytes(Blob)/sizeof(unsigned long);
0.22s RetVal=new unsigned long[(Size+1)*sizeof(unsigned long)];
0.06s sqlite3_blob_read(Blob,RetVal,Size*sizeof(unsigned long),0);
0.01s sqlite3_blob_close(Blob);
RetVal[Size]=0;

0.30s if (Size_!=0)
*Size_=Size;
0.01s return RetVal;
0.06s }
                                          
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to