Fossil

Check-in [a369dc77]
Login

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

Overview
Comment:Cache "manifest" setting in fossil_reserved_name() instead of reading it from the database on every call. This speeds up adding many files.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a369dc77210bf42ccf4ab50fd1d7a15ec371f061
User & Date: dmitry 2011-09-29 11:05:33
Original Comment: Change file_size() to file_wd_size() in file_is_the_same().
Context
2011-09-29
11:45
Change file_size() to file_wd_size() in file_is_the_same(). check-in: 13a771ce user: dmitry tags: trunk
11:05
Cache "manifest" setting in fossil_reserved_name() instead of reading it from the database on every call. This speeds up adding many files. check-in: a369dc77 user: dmitry tags: trunk
2011-09-28
11:35
Use the check-in time as the timestamp for zlib compression on tarballs, os that every tarball for the same check-in is identical. check-in: 3e141b79 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/add.c.

55
56
57
58
59
60
61







62
63
64
65
66
67
68
69
70
71
72
  /* Names of auxiliary files generated by SQLite when the "manifest"
  ** properity is enabled
  */
  static const char *azManifest[] = {
     "manifest",
     "manifest.uuid",
  };








  if( N>=0 && N<count(azName) ) return azName[N];
  if( N>=count(azName) && N<count(azName)+count(azManifest)
      && db_get_boolean("manifest",0) ){
    return azManifest[N-count(azName)];
  }
  return 0;
}

/*
** Return a list of all reserved filenames as an SQL list.







>
>
>
>
>
>
>



|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  /* Names of auxiliary files generated by SQLite when the "manifest"
  ** properity is enabled
  */
  static const char *azManifest[] = {
     "manifest",
     "manifest.uuid",
  };

  /* Cached setting "manifest" */
  static int cachedManifest = -1;

  if( cachedManifest == -1 ){
    cachedManifest = db_get_boolean("manifest",0);
  }

  if( N>=0 && N<count(azName) ) return azName[N];
  if( N>=count(azName) && N<count(azName)+count(azManifest)
      && cachedManifest ){
    return azManifest[N-count(azName)];
  }
  return 0;
}

/*
** Return a list of all reserved filenames as an SQL list.