From f7e968666e7e8248d18ae9bcac765f472c8b6883 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 21 Nov 2023 14:20:05 +0000 Subject: [PATCH] Remove memory trackign --- cista/app.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cista/app.py b/cista/app.py index bdacb03..6c879b5 100644 --- a/cista/app.py +++ b/cista/app.py @@ -2,7 +2,6 @@ import asyncio import datetime import mimetypes import threading -import tracemalloc from concurrent.futures import ThreadPoolExecutor from pathlib import Path, PurePath, PurePosixPath from stat import S_IFDIR, S_IFREG @@ -10,7 +9,6 @@ from urllib.parse import unquote from wsgiref.handlers import format_date_time import brotli -import objgraph import sanic.helpers from blake3 import blake3 from sanic import Blueprint, Sanic, empty, raw, redirect @@ -34,7 +32,6 @@ app.exception(Exception)(handle_sanic_exception) @app.before_server_start async def main_start(app, loop): - tracemalloc.start() config.load_config() app.ctx.threadexec = ThreadPoolExecutor( max_workers=3, thread_name_prefix="cista-ioworker" @@ -42,17 +39,6 @@ async def main_start(app, loop): await watching.start(app, loop) -@app.add_task -async def mem_task(): - while True: - await asyncio.sleep(10) - snapshot = tracemalloc.take_snapshot() - top_stats = snapshot.statistics("lineno") - for stat in top_stats[:10]: - print(stat) - objgraph.show_growth(limit=10) - - @app.after_server_stop async def main_stop(app, loop): quit.set()