techee commented on this pull request.
- {
- GStatBuf s; - - /* load file to memory and parse it from memory unless the file is too big */ - if (g_stat(file_name, &s) != 0 || s.st_size > 10*1024*1024) - parse_file = TRUE; - else - { - if (!g_file_get_contents(file_name, (gchar**)&text_buf, (gsize*)&buf_size, NULL)) - { - g_warning("Unable to open %s", file_name); - return FALSE; - } - free_buf = TRUE; - } - }
This is now done in ctags - see getMio(). The mem. size is just 1MB there instead of 10MB here but for normal sources it doesn't matter (and since ctags uses fgets() for input reading, even the file-based access is quite fast).