PerforceDirectPlugin: why so many calls to p4?

Hello,

This plugin is great but I find it a bit slow, probably because my p4 server is located on another continent than mine but also I think that plugin may use too many commands to execute one operation.

Here is the example of what the plugin does for an edit operation:

1. p4 where
2. p4 fstat
3. p4 edit

I don't understand why the 2 first steps are required, at first I thought that it was doing so to find the path of the file expressed in the depot or client syntax but for all 3 p4 invokations, the file path is expressed using the local syntax.
So, without source code, I have no clue why we need those 2 first steps.

Thanks for bringing light,

Gael

4 comments

This is one of the concerns I wanted to hear before I released 1.0.0.
:(

Let's have some explanations first, then we can discuss what to do...

The first two commands are there to find out what to do:
- whether the file is mapped to a connected perforce server/clientspec pair
(and if, which one, since you may have several clientspecs available in
one
project)
- what to do with the file based on its state, e.g.
- you may have R/O file that is not on the server
- cannot edit, need sync, etc. (some of the alternatives still to be
implemented)
This approach is taken for all plugin actions (to find out the status before
deciding what to do).

What you want is to call 'p4 edit' blindly without checking what we
can/should do.
It is technically possible but not for all actions.
I can imagine simplified 'Edit' or 'Sync' (full Sync can reverts, syncs and
edits
unchanged files), perhaps also 'Add' and 'Revert'.

If there is enough interest, I can do something with it. Now the question is
WHAT:
- have an checkbox in the Project Options to use simplified actions
- or provide duplicate actions "SimpleEdit", "SimpleSync", ...
- or use the off-line functionality (yet to-be-implemented) - mark the
server
as off-line and all 'p4 edit' will be just local action (file R/W and a
record
in the off-line log) and you can checkout (real 'p4 edit') later as a
batch
(but you'd have to do it still from IDEA, sorry)
- which actions

I understand that 'SimpleEdit' is not nicely replaceable with the external
tool
(like the 'Submit' is) because you cannot execute it for all files in the
search
window (for example when you do big refactoring and need 'p4 edit' all
affected files).

So, let me know what you think and we'll discuss what can be done.
So far, my highest priority is still the off-line functionality (after my
kids of course).

r.


"Gael Marziou" <itnadmin@jetbrains.com> wrote in message
news:30020564.1051617742248.JavaMail.jrun@is.intellij.net...

Hello,

>

This plugin is great but I find it a bit slow, probably because my p4

server is located on another continent than mine but also I think that
plugin may use too many commands to execute one operation.
>

Here is the example of what the plugin does for an edit operation:

>

1. p4 where
2. p4 fstat
3. p4 edit

>

I don't understand why the 2 first steps are required, at first I thought

that it was doing so to find the path of the file expressed in the depot or
client syntax but for all 3 p4 invokations, the file path is expressed using
the local syntax.

So, without source code, I have no clue why we need those 2 first steps.

>

Thanks for bringing light,

>

Gael

>
>


0

This is one of the concerns I wanted to hear before I
released 1.0.0.
:(


:)
I was only able to see it when I upgraded to a version which shows the p4 commands in swing popup, so they are useful.

- whether the file is mapped to a connected perforce
server/clientspec pair
(and if, which one, since you may have several
l clientspecs available in one project)


I don't understand this, in the plugin prefs, you specify one clientspec, so how can there be several of them?
Or maybe you mean client view mappings?
So, if the file is not mapped in the client view, the 'p4 edit' will fail and then you will recover in making the file writeable.

- what to do with the file based on its state, e.g.
- you may have R/O file that is not on the server
- cannot edit, need sync, etc. (some of the
he alternatives still to be
implemented)


To me, it's a bit risky to do so because you have to develop some logic that most of the time already exists in the p4 commands, so to me it looks like extra work and also a risk that the plugin may not follow what should be the intuitive behavior: the one that p4 commands users know when they execute them outside IDEA.

What you want is to call 'p4 edit' blindly without
checking what we can/should do.


Yes, it should be seen as the optimistic way ;)
My feeling is that the cases where those checkings are useful are not the most common ones, but by making them the default behavior it penalizes all operations.

It is technically possible but not for all actions.
I can imagine simplified 'Edit' or 'Sync' (full Sync
can reverts, syncs and edits
unchanged files), perhaps also 'Add' and 'Revert'.

If there is enough interest, I can do something with
it. Now the question is
WHAT:
- have an checkbox in the Project Options to use
simplified actions


This would be OK.
What about having only the simplified actions?
I don't clearly see what we would loose

- or provide duplicate actions "SimpleEdit",
"SimpleSync", ...


You would then have only a shortcut available for 2 actions, not very user friendly.

- or use the off-line functionality (yet
to-be-implemented) - mark the
server as off-line and all 'p4 edit' will be just local
al action (file R/W and a record in the off-line log)
and you can checkout (real 'p4 edit') later as a
batch (but you'd have to do it still from IDEA, sorry)


I don't like this because I'm an online user and want that my actions are immediately reflected in the server so that my colleagues know that I'm working on this file.
By the way, how are you going to manage exclusive locking with offline feature?

So far, my highest priority is still the off-line
functionality (after my
kids of course).


These are good priorities, especially the kids ;)

Gael

0

Hi Gael,

"Gael Marziou" <itnadmin@jetbrains.com> wrote in message
news:30020564.1051617742248.JavaMail.jrun@is.intellij.net...

Hello,

>

This plugin is great but I find it a bit slow, probably because my p4

server is located on another continent than mine but also I think that
plugin may use too many commands to execute one operation.

Latest version of P4 includes proxy server (P4Proxy AFAIR) that
solves this problem of accessing P4 from destributed locations.
AFAIU it's a some kind of a distributed cache that can be deployed
close to points of use.


Hope this helps.

Regards,

Slava Imeshev


0

That would probably help but only for operations that are common to several users like listing files or sync'ing but it would not help for personal operations like edit, delete which is what I was talking about in my original post.

0

Please sign in to leave a comment.