Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Intranet ,Custom postfix template stop IntelliJ #202

Open
lxk696 opened this issue Jul 13, 2021 · 9 comments
Open

In Intranet ,Custom postfix template stop IntelliJ #202

lxk696 opened this issue Jul 13, 2021 · 9 comments
Labels

Comments

@lxk696
Copy link

lxk696 commented Jul 13, 2021

In my company, computers can't access the Internet.
Each time you click Settings > editor > Custom postfix template, IntelliJ will pauses for a very long time.

version :
IntelliJ : 2021.1.2 Ultimate
Custom postfix template : 2.12.0.211

@lxk696 lxk696 changed the title Custom postfix template let IntelliJ stop In Intranet ,Custom postfix template stop IntelliJ Jul 13, 2021
@xylo xylo added the bug label Aug 9, 2021
@FFatTiger
Copy link

can fix it?
or something method of temporary repair

@xylo
Copy link
Owner

xylo commented Nov 13, 2022

I just tried to reproduce the bug in my local network by cutting the internet connection for some time. In my case IDEA did not hang at all, but the CPT plugin could not load the web templates from the internet. So I'm not sure why IDEA hangs in your case. Are you using a proxy or any kind of firewall which takes very long until a web request is either granted or rejected? That's the only thing I can image.

For those cases I could add an option in the settings allowing you to deactivate the automatic web templates update at all. Would that be a solution?

@lihaojiee
Copy link

I just tried to reproduce the bug in my local network by cutting the internet connection for some time. In my case IDEA did not hang at all, but the CPT plugin could not load the web templates from the internet. So I'm not sure why IDEA hangs in your case. Are you using a proxy or any kind of firewall which takes very long until a web request is either granted or rejected? That's the only thing I can image.

For those cases I could add an option in the settings allowing you to deactivate the automatic web templates update at all. Would that be a solution?

This button is very necessary. I also encountered such a situation. At first, I thought it was a problem for IntelliJ to respond. Ten minutes later, it still failed and I had to force IntelliJ to close. This is very frustrating.

@xylo
Copy link
Owner

xylo commented Dec 6, 2022

Oh, I forgot to mention that there is now an option to deactivate the automatic downloads of the web templates. It's in the settings:
grafik

@xylo
Copy link
Owner

xylo commented Dec 6, 2022

However, there is still room for improvement. Since usually most of the web templates do not change it's not necessary to download those. A simple header request and a check of the modification date would therefore reduce the traffic and increase the speed of the update process. I filed a new issue for this improvement under #226.

@xylo
Copy link
Owner

xylo commented Dec 6, 2022

I just tried to reproduce the bug in my local network by cutting the internet connection for some time. In my case IDEA did not hang at all, but the CPT plugin could not load the web templates from the internet. So I'm not sure why IDEA hangs in your case. Are you using a proxy or any kind of firewall which takes very long until a web request is either granted or rejected? That's the only thing I can image.
For those cases I could add an option in the settings allowing you to deactivate the automatic web templates update at all. Would that be a solution?

This button is very necessary. I also encountered such a situation. At first, I thought it was a problem for IntelliJ to respond. Ten minutes later, it still failed and I had to force IntelliJ to close. This is very frustrating.

However, first time users still have to wait until all web templates got updated. So the freeze problem still persists until the user was able to uncheck this check box. To avoid a freeze for minutes, I will add a timeout to the update process. Something around 5 seconds might be acceptable I think.? If the web templates did not get loaded within 5 seconds the update process is cancelled and the user should be offered to deactivate the automatic update. (#227)

@lihaojiee
Copy link

I just tried to reproduce the bug in my local network by cutting the internet connection for some time. In my case IDEA did not hang at all, but the CPT plugin could not load the web templates from the internet. So I'm not sure why IDEA hangs in your case. Are you using a proxy or any kind of firewall which takes very long until a web request is either granted or rejected? That's the only thing I can image.
For those cases I could add an option in the settings allowing you to deactivate the automatic web templates update at all. Would that be a solution?

This button is very necessary. I also encountered such a situation. At first, I thought it was a problem for IntelliJ to respond. Ten minutes later, it still failed and I had to force IntelliJ to close. This is very frustrating.

However, first time users still have to wait until all web templates got updated. So the freeze problem still persists until the user was able to uncheck this check box. To avoid a freeze for minutes, I will add a timeout to the update process. Something around 5 seconds might be acceptable I think.? If the web templates did not get loaded within 5 seconds the update process is cancelled and the user should be offered to deactivate the automatic update. (#227)

First, it's a good solution. However, if it is possible to not update any templates by default when the plugin is loaded for the first time, and it is up to the user to decide whether to use the network template, there may be a better user experience, which can be explained in the documentation.

@xylo
Copy link
Owner

xylo commented Dec 6, 2022

Well, I guess that only a few people will read the documentation before using the plugin. So far I thought the best user experience would be "install the plugin and you immediately have hundreds of useful templates at your disposal".
However, since this procedure breaks the user experience for some users like you, you have a point, but I believe only a small number of users are affected by this problem. Therefore I don't want to make the problem too complicated in use, which might break the user experience for 95% of the users.
On the other hand, unsolicited access to the Internet might be something that could annoy even more people than just 5%. So in this regard it would be actually nice if the users get asked if he/she wants to enable the automatic updates of the web templates. Maybe this could be done via a notification popup similar to those which tells you that new web templates have been downloaded. I like this idea. However, it requires quite some changes to the current implementation in order to keep a good user experience for most of the users. See #228 for more details.

@xylo
Copy link
Owner

xylo commented Dec 6, 2022

Maybe I could reproduce the behavior with mitmproxy. 🤔 I will try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants