};
-size_t file_cache_slot::line_record_size = 100;
+size_t file_cache_slot::line_record_size = 0;
/* Tune file_cache. */
void
size_t delta = rlen >= 1 ?
m_line_num - m_line_record[rlen - 1].line_num : 1;
+ size_t max_size = line_record_size;
+ /* One anchor per hundred input lines. */
+ if (max_size == 0)
+ max_size = m_line_num / 100;
+
/* If we're too far beyond drop half of the lines to rebalance. */
- if (rlen == line_record_size && delta >= spacing*2)
+ if (rlen == max_size && delta >= spacing*2)
{
size_t j = 0;
for (size_t i = 1; i < rlen; i += 2)
spacing *= 2;
}
- if (rlen < line_record_size && delta >= spacing)
+ if (rlen < max_size && delta >= spacing)
m_line_record.safe_push
(file_cache_slot::line_info (m_line_num,
m_line_start_idx,
-param=file-cache-files=
Common Joined UInteger Var(param_file_cache_files) Init(16) Param
-Max number of files in the file cache.
+Max number of files in the file cache. When 0 this is automatically sized.
-param=file-cache-lines=
-Common Joined UInteger Var(param_file_cache_lines) Init(100) Param
+Common Joined UInteger Var(param_file_cache_lines) Init(0) Param
Max number of lines to index into file cache.
-param=fsm-scale-path-stmts=