Replies: 7 comments 5 replies
-
When file contents are displayed, this either happens for some historical revision of given file or the current revision. In the latter case the webapp determines the latest revision first and then redirects to URL that contains the revision (e.g. The described behavior usually happens if there is old index and the history cache is stale. This is because the webapp will try to lookup the latest revision of given file in the index first; if not found there, it will fall back to the history cache. If the history cache for given file is stale (i.e. the historycache file's last modification time is smaller than the last modification time of the source file; the timestamp of the xref file does not matter at this point), the SCM in question is used to lookup this information. This is likely the cause of the extra latency. This does not not manifest on the old version probably because this behavior was introduced later. You did not say how the migration from the old version was done, however it seems the documents in the index do not contain the date information. Reindexing from scratch will likely fix the issue. |
Beta Was this translation helpful? Give feedback.
-
That said, it should be investigated why the latest revision retrieval for given repository takes so long. Git repository implementation in OpenGrok uses custom |
Beta Was this translation helpful? Give feedback.
-
Also, the code that performs the last revision lookup should be augmented with log statements and perhaps also export latency data so it can be collected using the monitoring tools. |
Beta Was this translation helpful? Give feedback.
-
For the record, to get the last history entry for given file in the above linked Android repository, with a hacked OpenGrok (had to remove code that resolves paths relative to source root so that I can run the code from a test), it takes 5 seconds when calling |
Beta Was this translation helpful? Give feedback.
-
Hello @vladak, thanks for you reply You also said that "If the history cache for given file is stale (...), the SCM in question is used to lookup this information". I have "--history" enabled on index command. Should I use diff flag for history refresh? The index command I`m running is:
|
Beta Was this translation helpful? Give feedback.
-
The only potentially suspicious thing in the indexer command is |
Beta Was this translation helpful? Give feedback.
-
Oh, the indexer is missing the
which means there will be no history cache and also no history in the index. |
Beta Was this translation helpful? Give feedback.
-
I have an open source git indexed by openGrok, but when I try to open any file under this repository, it takes longer than 1 and a half minute to display the page. I think it tries to collect some additions info from history what make it very slow to show the final page.
I have checked and xref file is already generated (with a newer date than git workspace).
Code base is available at https://android.googlesource.com/platform/frameworks/base/ and have more than 688k commits on its history.
I'm migrating from an old openGrok version (1.0.0) to 1.7.31. The issue cannot be reproduced at older version (I know the gap is huge) even running on a oldest server configuration.
It there any way to disable any remote checking and just display "xref" file content?
Some additional information:
Client side:
Chrome & Firefox
tomcat bin/setenv.sh content:
For other projects that have smaller history, the issue can not be noticeable.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions