From 0faa3e93e1bae28ff04e1bfcb87d385a569676a3 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 27 Dec 2018 22:57:53 +0100 Subject: [PATCH] summary: don't load size on container expand, only on manual action. - this is too heavy to open without explicit action - increase locking timeout to 15min - expose basic info on summary page without expand. --- rhodecode/lib/rc_cache/backends.py | 2 +- rhodecode/public/js/src/rhodecode.js | 1 + rhodecode/templates/summary/components.mako | 40 ++++++++++++++------- rhodecode/templates/summary/summary.mako | 12 +++---- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/rhodecode/lib/rc_cache/backends.py b/rhodecode/lib/rc_cache/backends.py index d7baac19..aa6cbb40 100644 --- a/rhodecode/lib/rc_cache/backends.py +++ b/rhodecode/lib/rc_cache/backends.py @@ -96,7 +96,7 @@ class CustomLockFactory(FileLock): # set non-blocking, this will cause an exception if we cannot acquire a lock operation |= fcntl.LOCK_NB start_lock_time = time.time() - timeout = 60 * 5 # 5min + timeout = 60 * 15 # 15min while True: try: flock_org(fd, operation) diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js index b0ca809b..67de7fb3 100644 --- a/rhodecode/public/js/src/rhodecode.js +++ b/rhodecode/public/js/src/rhodecode.js @@ -76,6 +76,7 @@ var showRepoSize = function(target, repo_name, commit_id, callback) { var url = pyroutes.url('repo_stats', {"repo_name": repo_name, "commit_id": commit_id}); + container.show(); if (!container.hasClass('loaded')) { $.ajax({url: url}) .complete(function (data) { diff --git a/rhodecode/templates/summary/components.mako b/rhodecode/templates/summary/components.mako index 9a67ea15..bde86b97 100644 --- a/rhodecode/templates/summary/components.mako +++ b/rhodecode/templates/summary/components.mako @@ -83,9 +83,9 @@ - +