mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-02 04:53:36 +00:00 
			
		
		
		
	katex: Replace subprocess call with minimal external service.
Replace a separate call to subprocess, starting `node` from scratch, with an optional standalone node Express service which performs the rendering. In benchmarking, this reduces the overhead of a KaTeX call from 120ms to 2.8ms. This is notable because enough calls to KaTeX in a single message would previously time out the whole message rendering. The service is optional because he majority of deployments do not use enough LaTeX to merit the additional memory usage (60Mb). Fixes: #17425.
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							5fd38f15a6
						
					
				
				
					commit
					c13e3dee24
				
			| @@ -46,7 +46,7 @@ def build_for_dev_server(host: str, port: str, minify: bool, disable_host_check: | ||||
|     webpack_args = ["../node_modules/.bin/webpack-cli", "serve"] | ||||
|     webpack_args += [ | ||||
|         # webpack-cli has a bug where it ignores --watch-poll with | ||||
|         # multi-config, and we don't need the katex-cli part anyway. | ||||
|         # multi-config, and we don't need the katex part anyway. | ||||
|         "--config-name=frontend", | ||||
|         f"--host={host}", | ||||
|         f"--port={port}", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user