mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 18:10:53 +01:00
e57f209056
Summary: I have blame enabled by default and displaying files with long history takes easily over 10 seconds. Load the blame data by AJAX instead. This is actually doing more work and the total response time is longer but it's worth it for me as I am interested just in the file contents quite often. I know you were talking about building blame cache but until we have it... I'm not sure if the AJAX loading indicator in bottom right corner is enough to inform the user that we are loading it on background. Test Plan: ?view=highlighted ?view=plainblame ?view=blame Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5244
14 lines
309 B
JavaScript
14 lines
309 B
JavaScript
/**
|
|
* @provides javelin-behavior-load-blame
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-request
|
|
*/
|
|
|
|
JX.behavior('load-blame', function(config) {
|
|
|
|
new JX.Request(location.href, function (response) {
|
|
JX.DOM.setContent(JX.$(config.id), JX.$H(response));
|
|
}).send();
|
|
|
|
});
|