perfromance x6000%

This commit is contained in:
Patrice 2019-06-10 12:49:42 +02:00
parent 049ad4a666
commit d61dc1fdac
11 changed files with 9 additions and 10218 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
__pycache__/
cached/

Binary file not shown.

7
app.py
View File

@ -58,9 +58,10 @@ def load(url):
# Controllers.
#----------------------------------------------------------------------------#
@app.route('/test/')
@app.route('/')
def index():
url = request.args.get("url")
#url = request.args.get("url")
url = "https://www.google.com"
cached = os.listdir("./cached")
withoutProtocol = url.rsplit('/')[2]
if withoutProtocol + '.txt' not in cached:
@ -73,7 +74,7 @@ def index():
if __name__ == '__main__':
port = int(os.environ.get('PORT', 80))
sys.setrecursionlimit(2000)
sys.setrecursionlimit(5000)
app.run(host='0.0.0.0', port=port)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View File

@ -16,7 +16,7 @@ class url:
exclude = {
"title=Spezial",
"offset=",
"doodles/",
"#",
"&"
}