History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-11856
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Maxim Drobintsev
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Option to turn off Perforce synchronization on frame activation

Created: 10 Nov 06 22:16   Updated: 13 Nov 06 21:09
Component/s: Version Control Integration. Perforce
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Linux x86 64 bit
SUN JDK 1.5.0_06 32 bit

Build: 6,094
Severity: Medium


 Description  « Hide
IntelliJ Perforce plugin should not refresh client info if the setting "Synchronize files on frame activation" is set to "off".
Currently it does and this slows the things down when switching between IDEA and command line tools.

Here is how to reproduce this bug:

1. Make sure the global setting "Synchronize files on frame activation" is "off"
2. Open a project where Perforce is the VCS and configure IntelliJ Perforce plugin to log commands to p4.output
3. Open command line shell (e.g. bash) and delete the current file p4.output
4. Switch to IDEA
5. Switch to shell
6. Switch to IDEA
7. Switch to shell
8. Switch to IDEA
9. Switch to shell
10. Execute the following shell commands:

grep -e "client.*Err" /usr/local/idea/bin/p4.output
grep "infoErr" /usr/local/idea/bin/p4.output
grep "openedErr" /usr/local/idea/bin/p4.output

and you will see that each of the above three commands was executed 3 times.

Expected result: IntelliJ Perforce plugin should not refresh client info if the setting "Synchronize files on frame activation" is "off"

Thanks,
Maxim.



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 13 Nov 06 15:16
I don't understand why you think this is a bug. The option "Synchronize files on frame activation" controls synchronization of files on frame activation, which is not in any way related to 'p4 info'. We can add a new option to turn off update of p4 info and changelist synchronization on frame activation, but this will be an independent setting.

Maxim Drobintsev - 13 Nov 06 21:05
It just occured to me that "Synchronize files on frame activation" should apply to Perforce synchronization as well. One of the reasons why I think so is because when I do execute File:Synchronize command Perforce synchronization happens as well. If you think it is more natural to do it as a separate setting I am totally fine with that. The point is that I need a way to tell IDEA not to do any automatic refresh/synchronize operations when its frame is activated. As I mentioned my Perforce server is quite slow sometimes and IDEA tends to completely freeze when I activate the frame. Although the blocking issue can be resolved by doing things in the background I think it will lead to unjustified complexity (e.g. what happens if I activate and deactivate the frame many times and many background synchronization commands run in parallel?). I am currently working with the setting "Synchronize files on frame activation" turned off and it is very convenient and simple. I know with 100% certainty when I want files to be synchronized and I can execute that command myself.

If you do add a separate setting for turning off automatic perforce synchronization (BTW this setting should then apply to periodic automatic synchronization also) please make sure it affects all commands including the "p4 fstat" command that is done when the popup Perforce menu is invoked. I can live with the possible errors that might be caused by concurrent changes (the probability of such errors is very small anyway and it can not be eliminated completely regardless how often you synchronize the state with the server).