Boost priority for essential files to allow concurrent requests

This commit is contained in:
shortcutme 2017-05-07 18:19:08 +02:00
parent 438bdbc141
commit 3f772d1e1e
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -391,16 +391,16 @@ class WorkerManager(object):
if "-default" in inner_path: if "-default" in inner_path:
return -4 # Default files are cloning not important return -4 # Default files are cloning not important
elif inner_path.endswith(".css"): elif inner_path.endswith(".css"):
return 7 # boost css files priority return 17 # boost css files priority
elif inner_path.endswith(".js"): elif inner_path.endswith(".js"):
return 6 # boost js files priority return 16 # boost js files priority
elif inner_path.endswith("dbschema.json"): elif inner_path.endswith("dbschema.json"):
return 5 # boost database specification return 15 # boost database specification
elif inner_path.endswith("content.json"): elif inner_path.endswith("content.json"):
return 1 # boost included content.json files priority a bit return 1 # boost included content.json files priority a bit
elif inner_path.endswith(".json"): elif inner_path.endswith(".json"):
if len(inner_path) < 50: # Boost non-user json files more if len(inner_path) < 50: # Boost non-user json files more
return 4 return 14
else: else:
return 2 return 2
return 0 return 0