Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:54
    jcubic closed #696
  • 06:53
    jcubic closed #697
  • 06:53
    jcubic commented #697
  • Sep 21 17:47
    jcubic commented #697
  • Sep 21 17:47
    jcubic commented #697
  • Sep 21 17:43
    jcubic edited #691
  • Sep 21 17:24
    jcubic commented #697
  • Sep 21 17:20
    jcubic commented #696
  • Sep 21 16:41
    SuibianP commented #695
  • Sep 21 16:31
    SuibianP opened #697
  • Sep 21 16:15
    SuibianP commented #696
  • Sep 21 15:45
    jcubic commented #696
  • Sep 21 15:40
    jcubic commented #695
  • Sep 21 15:39
    jcubic labeled #695
  • Sep 21 15:16
    jcubic commented #695
  • Sep 21 15:08
    jcubic commented #695
  • Sep 21 15:07
    jcubic labeled #695
  • Sep 21 15:07
    jcubic commented #695
  • Sep 21 14:48
    SuibianP opened #696
  • Sep 21 14:23
    SuibianP opened #695
Jakob Papirov
@JakobPapirov
I'm using tailwindcss
I've decided to use it for this project
I'm still learning, but am using it for another project of mine. it has as in bootstrap sm: xl:
Jakub T. Jankiewicz
@jcubic
Here is example of vh and colors https://codepen.io/jcubic/pen/xReWxJ
Jakob Papirov
@JakobPapirov
cool tnx
on my todo list is to figure out how to generate ascii like that. I've seen something about it in the docs.
I see now that you specified the height in the css, not in the js file
Jakub T. Jankiewicz
@jcubic
The ASCII that is showing by default was created by hand. But you can use figlet library generate different text using ASCII fonts
Jakob Papirov
@JakobPapirov
oh
cool
yes read something abt the figlet lib
Jakub T. Jankiewicz
@jcubic
Jakob Papirov
@JakobPapirov
I've been using your example from the docs :
{
                greetings: `Welcome to NetSide! You'll find the repo @ [[!;i;black]https://github.com/JakobPapirov/NetSide]\n
Available commands are:
[[b;green;black]login]
[[b;green;black]login help]
[[b;green;black]login user]
[[b;green;black]credits]\n`,
                name: 'playArea',
                height: 600,
                width: '100%',
                prompt: '>>> '
            }
as part of the initialisation of a terminal
I'll be back tomorrow :)
danishjmi01
@danishjmi01
Hello All, I have an web based terminal application which uses jquery.terminal-2.19.2. When I enter some command on terminal repeatedly in fast manner then the terminal becomes sluggish. This issue was not there when we were using jquery-0.10.0 . Has anyone faced the same before? Any solutions?
Jakub T. Jankiewicz
@jcubic
not sure about 2.19.2 but recently there was error that prevent repeated echo messages to be ignored because of cache jcubic/jquery.terminal#672
try the latest version of the library to see if the issue is still there
Jakob Papirov
@JakobPapirov
Hi @jcubic I'm back! How are you?
danishjmi01
@danishjmi01

not sure about 2.19.2 but recently there was error that prevent repeated echo messages to be ignored because of cache jcubic/jquery.terminal#672

I have tried the latest version 2.27.1 but the issue was still there. Thanks

Jakub T. Jankiewicz
@jcubic
@danishjmi01 I have no idea, I don't use the library for a long period time. How long does it take to make it slow? How much content do you print on the terminal? The cache was added in 2.12.0, can you check 2.11.1?
I can create some testing code to see how terminal behave on longer use. It may be that the memory usage is too big and the browser don't handle it, because of cache. This is the only thing I can think of.
Jakub T. Jankiewicz
@jcubic
Also if you have a project public I can try to see if there are no issue with your code (also related to the library itself).
danishjmi01
@danishjmi01
@jcubic Thanks for your inputs. if the command output is around 40 lines and I repeatedly shoot the command for just 15 seconds, then the sluggishness starts to appear. I will try with 2.11.1 and let you know.
Jakub T. Jankiewicz
@jcubic
@danishjmi01 do you have the app public or maybe on some git hosting? I can test your application, it would be much easier instead of guessing what is happening I will check the profiler and maybe memory consumption and see.
danishjmi01
@danishjmi01
Hey @jcubic , I tried with other older versions of jquery.terminal and I figured out that it was version 1.0.0 where the issue starts occuring. Until 0.11.23 it is behaving as expected. Apologies, I can't paste any of our code and you can not access the terminal via web as its not publicly available. Please let me know if any other information I can provide. Or just give me some hint where I should be able to look at my code.
Jakub T. Jankiewicz
@jcubic
@danishjmi01 do you have this application behind VPN or intranet? Maybe you can send access to my email, I will not share it anywhere. I've had cases where people send my copy of the code in an email, I can sign NDA if you want.
hello-smile6
@hello-smile6
?
Jakub T. Jankiewicz
@jcubic
This message was deleted
@hello-smile6 ...
danishjmi01
@danishjmi01
Hey @jcubic , thanks for your suggestions on this, however I am restricted by the policies of my organisation hence can't take any decision unilaterally. I have found some more hints, its the set_command() API of the terminal object that is being slowing down. Can this be helpful for you to have a look ?
Jakub T. Jankiewicz
@jcubic
@danishjmi01 I don't want you to show your whole code if you can't. But I think that you can spend a moment and try to recreate the issue you have. On how you call set_command() function.
danishjmi01
@danishjmi01
The scenario is like this- 1. We are getting the characters on the keypress event and sending them to server at backend via webSocket, the server then returns back the character to frontend, which is captured by OnMessage() callback of websocket and displayed by set_command() API of terminal object. 2. When enter is pressed, the server assumes the command is finished and it performs the processing and sends back the result via the same webSocket. The result is captured by OnMessage callback of webSocket and displayed by set_command() API of terminal object.
commenting-out the set_command() API resolves the sluggishness but of course then the text does not appear on web-terminal.
Using terminal.echo() results in the same behaviour.
Jakub T. Jankiewicz
@jcubic
I don't understand the usage of set_command() here set_command is used as a way to enter characters the same as user do this. So if user enters the characters there is no need to use set_command() from the server unless the keys users enter are different then those that are returned from server.
Also note that if you have lot of data send to terminal (if you don't have limit) the browser will slow down because there is too much DOM nodes on the page.
danishjmi01
@danishjmi01
Thanks @jcubic , sluggishness might be due to too many DOM objects. But the slugishness was negligible in 0.11.23 version of jquery.terminal and it is more severe in 1.0.0 version. Do you think any specific reason for this?
Jakub T. Jankiewicz
@jcubic
I will need to see the reproduction to be sure, I don't understand why you can create simple application that use core API without showing rest of the code. Without looking the running application I'm afraid nothing I can do. Just to let you know you will not get any help from anyone if you don't show reproduction of the bug. Bigger project even ignore stuff like this. No reproduction, sorry buy. But I want to help and try to explain that you need to help me so I can help you.
danishjmi01
@danishjmi01

// --------In Version 0.11.23-----------------------------------------------------
// :: Change the command line to the new one
// -------------------------------------------------------------
set_command: function(command) {
init_deferr.then(function() {
command_line.set(command);
});
return self;
},

// ------In version 2.28.1-------------------------------------------------------
// :: Change the command line to the new one
// -------------------------------------------------------------
set_command: function(command, silent) {
when_ready(function ready() {
// TODO: refactor to use options - breaking change
if (typeof command !== 'string') {
command = JSON.stringify(command);
}
command_line.set(command, undefined, silent);
});
return self;
},

Do you think any changes from 0.11.23 to current one can induce the issue?

Jakub T. Jankiewicz
@jcubic
and?
the current implementation looks like this:
set_command: function(command, silent) {
                when_ready(function ready() {
                    // TODO: refactor to use options - breaking change
                    if (typeof command !== 'string') {
                        command = JSON.stringify(command);
                    }
                    command_line.set(command, undefined, silent);
                });
                return self;
            },
when ready will not be async like defered.the that was updated to be compatible with promises A+
@danishjmi01 If you can't show the code even simple reproduction of the issue, you will need to debug the library yourself or use version 0.11.23
The only thing I see in lastest version is that in latest version the command line is splitted into each character. Sorry I don't understand why you need to use set_command() with data from server
another idea is cache for the formated text that is to speed up cursor movement on command line that have syntax hightlighing
danishjmi01
@danishjmi01
I understand its difficult to figureout problem without reproduction. But I am restricted by my organisation's policies. And thank you for all your suggestions and advices till now. If I manage to get approvals to share specific things, I will let you know.
Jakub T. Jankiewicz
@jcubic
@danishjmi01 you can tell your boss or whoever is in charge that I can sign the NDA and we can contact privately, maybe with an email or some other online form of communication. I'm also providing paid support if you need any.
Ra0R
@Ra0R
Hey guys, is there a possibility to create a selection of options (e.g. [start stop quit]) which can be selected with the keyboard arrows?
I skimmed the documentation and didn't find anything.
Jakub T. Jankiewicz
@jcubic
@Ra0R there is new extension, forms. see demo https://codepen.io/jcubic/pen/jOWRLex
Sorry, for the delay, I didn't notice the message