vscode-kafka
vscode-kafka copied to clipboard
Should consumer view be available on Output?
Today the consumer view is based on a text editor which provides the capability to support syntax coloration with TextMate. The editor content is filled with https://github.com/jlandersen/vscode-kafka/blob/master/src/providers/consumerVirtualTextDocumentProvider.ts which implements vscode.TextDocumentContentProvider
which requires to store the all messages from the kafka consumer.
When the kafka consumer fires a lot of messages, vscode crashes in few minutes. To reproduce the problem, open the __consumer_offsets
topic which generates so many messages and wait for few minutes and vscode will crashes. I though it was my TextMate support which caused this problem, but without TextMate grammar we have the same problem.
That's why I wonder if the consumer view should be based on terminal API. When I see terminal sample at https://github.com/microsoft/vscode-extension-samples/blob/master/extension-terminal-sample/src/extension.ts the buffer is not stored, so I think we will not have the vscode crash problem. But we will loose syntax coloration based on TextMate.
@jlandersen what do you think about this Terminal idea?
Instead of using Terminal API, we could use Output Channel.
@jlandersen I wonder what you have not implemented Kafka consumer with Output channel since you did that for Kafka producer?
I put a comment in the PR https://github.com/jlandersen/vscode-kafka/pull/57. Hoping that explains it. We can keep the discussion here going forward.