Fossil

Check-in [3d802ec5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Performance optimization in the control artifact parser.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3d802ec514f6e48414e749b3e8821f8b091d73522bd90db40bf54d06c5fcb70e
User & Date: drh 2019-09-12 16:31:25
Context
2019-09-12
16:43
Add the --limit N option to the test-parse-all-blobs test command, so that we can easily limit the run-time of that command for cachegrind performance testing. check-in: 52211ccc user: drh tags: trunk
16:31
Performance optimization in the control artifact parser. check-in: 3d802ec5 user: drh tags: trunk
07:31
Add the lock-timeout setting. check-in: 6d3daf74 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/manifest.c.

343
344
345
346
347
348
349
350
351
352
353
354

355
356
357
358
359
360
361
362
363
364
365
366
};

/*
** Return a pointer to the next token.  The token is zero-terminated.
** Return NULL if there are no more tokens on the current line.
*/
static char *next_token(ManifestText *p, int *pLen){
  char *z;
  char *zStart;
  int c;
  if( p->atEol ) return 0;
  zStart = z = p->z;

  while( (c=(*z))!=' ' && c!='\n' ){ z++; }
  *z = 0;
  p->z = &z[1];
  p->atEol = c=='\n';
  if( pLen ) *pLen = z - zStart;
  return zStart;
}

/*
** Return the card-type for the next card.  Or, return 0 if there are no
** more cards or if we are not at the end of the current card.
*/







<

|

|
>
|
|
|
<
|







343
344
345
346
347
348
349

350
351
352
353
354
355
356
357

358
359
360
361
362
363
364
365
};

/*
** Return a pointer to the next token.  The token is zero-terminated.
** Return NULL if there are no more tokens on the current line.
*/
static char *next_token(ManifestText *p, int *pLen){

  char *zStart;
  int n;
  if( p->atEol ) return 0;
  zStart = p->z;
  n = strcspn(p->z, " \n");
  p->atEol = p->z[n]=='\n';
  p->z[n] = 0;
  p->z += n+1;

  if( pLen ) *pLen = n;
  return zStart;
}

/*
** Return the card-type for the next card.  Or, return 0 if there are no
** more cards or if we are not at the end of the current card.
*/