-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance optimizations for big repos #1277
base: master
Are you sure you want to change the base?
Conversation
… are too aggressive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests on travis are failing for the same reasons:
https://travis-ci.org/FredrikNoren/ungit/jobs/651035697#L1570
} | ||
|
||
setData(logEntry) { | ||
this.title(logEntry.message.split('\n')[0]); | ||
this.parents(logEntry.parents || []); | ||
this.commitTime = logEntry.commitDate; | ||
this.date = Date.parse(this.commitTime); | ||
this.timestamp = logEntry.timestamp || Date.parse(this.commitTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the commitDate
is already parsed on the server is the fallback here still required?
this.timestamp = logEntry.timestamp || Date.parse(this.commitTime); | |
this.timestamp = logEntry.timestamp; |
Co-Authored-By: campersau <[email protected]>
I think this can be closed, see #1461 |
Prevent full gitlog history from server to client and load only what is needed
Upon page load, client will make and API call to get list of git nodes. However, this call gets list of ALL nodes every time. i.e. if a pages is showing 300 nodes and user scrolls down asking for 25 more nodes, backend will return 325 nodes, not just the 25 nodes needed.
This is now fixed and backend will return only the nodes client needs.
Prevent redundant ref and node calculations per each /gitlog api call
One of the biggest performance hit for big repos was due to git refs calculations because ungit loads ALL
refs, local and remote branches and tags of it's history.
This is needed to some degree to display them in the branch drop down and etc, but there were some inefficiencies on logic that thinking these refs had valid nodes and did unnecessary calculations.