Re: [aos-devel] optimizing go guru

2017-12-05 Thread Luke Meyer
If the answer is just "go guru is dog slow, use something else in that
case" then that seems like a useful thing to note in the README :) Along
with what people actually use in development. Seems like a number of tools
rely on guru but everyone complains about how slow it is on large projects.
So that's one more vote for VS...

On Tue, Dec 5, 2017 at 10:53 AM, Dan Mace  wrote:

>
>
> On Tue, Dec 5, 2017 at 10:43 AM, Luke Meyer  wrote:
>
>> In the context of the vim-go plugin. However behavior seems much the same
>> if I run the same command at the command line (I pulled it out of ps -ef).
>>
>> On Tue, Dec 5, 2017 at 10:40 AM, Sebastian Jug  wrote:
>>
>>> Are you using guru in some sort of editor/IDE or just standalone?
>>>
>>> On Dec 5, 2017 9:40 AM, "Luke Meyer"  wrote:
>>>


 On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug  wrote:

> Sounds like you have got auto compile still on?
>
>
 What does this mean in the context of go guru? Is there an env var to
 set, an option to add, a config file to change to control this behavior?


>>>
>>
> ​The same query:
>
> guru -scope github.com/openshift/origin/cmd/oc whicherrs
> ./pkg/oc/admin/diagnostics/diagnostics.go:#7624
>
> was taking long enough for me (go1.8.3 darwin/amd64) that I killed it.
> It's hard to say without doing a deeper profile of that guru command. Even
> with your relatively narrow pointer analysis scope ​it seems really slow,
> but then again it's hard to gauge exactly how narrow that scope is without
> looking at a full import dependency graph...
>
> Guru has always been really slow for lots of useful pointer analysis
> queries, so I'm not entirely surprised. This is why vscode-go uses a
> variety of more optimized special purpose tools for most analysis[1].
>
> [1] https://github.com/Microsoft/vscode-go/blob/
> master/src/goInstallTools.ts#L21
>
> --
>
> Dan Mace
>
> Principal Software Engineer, OpenShift
>
> Red Hat
>
> dm...@redhat.com
>
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: [aos-devel] optimizing go guru

2017-12-05 Thread Luke Meyer
On Tue, Dec 5, 2017 at 10:51 AM, Clayton Coleman 
wrote:

> Openshift and Kubernetes are massive go projects - over 3 million lines of
> code (last I checked).  Initial compile can take a few minutes for these
> tools.  Things to check:
>
> 1. Go 1.9 uses less memory when compiling
> 2. Be sure you are reusing your go compiled artifacts dir between multiple
> tools (sometimes that is GOPATH/pkg, but openshift explicitly only compiles
> temp packages into _output/local/pkgdir for reasons)
>


So if I make clean all and then run my guru command, won't that be reusing
compiled artifacts? Is there some config that controls this? I don't think
I've customized anything.

It does seem to speed up a little bit after the first run but then it's
still pretty slow.



> 3. Get faster laptop :)
>
> On Dec 5, 2017, at 9:44 AM, Luke Meyer  wrote:
>
> In the context of the vim-go plugin. However behavior seems much the same
> if I run the same command at the command line (I pulled it out of ps -ef).
>
> On Tue, Dec 5, 2017 at 10:40 AM, Sebastian Jug  wrote:
>
>> Are you using guru in some sort of editor/IDE or just standalone?
>>
>> On Dec 5, 2017 9:40 AM, "Luke Meyer"  wrote:
>>
>>>
>>>
>>> On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug  wrote:
>>>
 Sounds like you have got auto compile still on?


>>> What does this mean in the context of go guru? Is there an env var to
>>> set, an option to add, a config file to change to control this behavior?
>>>
>>>
>>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: [aos-devel] optimizing go guru

2017-12-05 Thread Dan Mace
On Tue, Dec 5, 2017 at 10:43 AM, Luke Meyer  wrote:

> In the context of the vim-go plugin. However behavior seems much the same
> if I run the same command at the command line (I pulled it out of ps -ef).
>
> On Tue, Dec 5, 2017 at 10:40 AM, Sebastian Jug  wrote:
>
>> Are you using guru in some sort of editor/IDE or just standalone?
>>
>> On Dec 5, 2017 9:40 AM, "Luke Meyer"  wrote:
>>
>>>
>>>
>>> On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug  wrote:
>>>
 Sounds like you have got auto compile still on?


>>> What does this mean in the context of go guru? Is there an env var to
>>> set, an option to add, a config file to change to control this behavior?
>>>
>>>
>>
>
​The same query:

guru -scope github.com/openshift/origin/cmd/oc whicherrs
./pkg/oc/admin/diagnostics/diagnostics.go:#7624

was taking long enough for me (go1.8.3 darwin/amd64) that I killed it. It's
hard to say without doing a deeper profile of that guru command. Even with
your relatively narrow pointer analysis scope ​it seems really slow, but
then again it's hard to gauge exactly how narrow that scope is without
looking at a full import dependency graph...

Guru has always been really slow for lots of useful pointer analysis
queries, so I'm not entirely surprised. This is why vscode-go uses a
variety of more optimized special purpose tools for most analysis[1].

[1]
https://github.com/Microsoft/vscode-go/blob/master/src/goInstallTools.ts#L21

-- 

Dan Mace

Principal Software Engineer, OpenShift

Red Hat

dm...@redhat.com
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: [aos-devel] optimizing go guru

2017-12-05 Thread Clayton Coleman
Openshift and Kubernetes are massive go projects - over 3 million lines of
code (last I checked).  Initial compile can take a few minutes for these
tools.  Things to check:

1. Go 1.9 uses less memory when compiling
2. Be sure you are reusing your go compiled artifacts dir between multiple
tools (sometimes that is GOPATH/pkg, but openshift explicitly only compiles
temp packages into _output/local/pkgdir for reasons)
3. Get faster laptop :)

On Dec 5, 2017, at 9:44 AM, Luke Meyer  wrote:

In the context of the vim-go plugin. However behavior seems much the same
if I run the same command at the command line (I pulled it out of ps -ef).

On Tue, Dec 5, 2017 at 10:40 AM, Sebastian Jug  wrote:

> Are you using guru in some sort of editor/IDE or just standalone?
>
> On Dec 5, 2017 9:40 AM, "Luke Meyer"  wrote:
>
>>
>>
>> On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug  wrote:
>>
>>> Sounds like you have got auto compile still on?
>>>
>>>
>> What does this mean in the context of go guru? Is there an env var to
>> set, an option to add, a config file to change to control this behavior?
>>
>>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: [aos-devel] optimizing go guru

2017-12-05 Thread Luke Meyer
In the context of the vim-go plugin. However behavior seems much the same
if I run the same command at the command line (I pulled it out of ps -ef).

On Tue, Dec 5, 2017 at 10:40 AM, Sebastian Jug  wrote:

> Are you using guru in some sort of editor/IDE or just standalone?
>
> On Dec 5, 2017 9:40 AM, "Luke Meyer"  wrote:
>
>>
>>
>> On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug  wrote:
>>
>>> Sounds like you have got auto compile still on?
>>>
>>>
>> What does this mean in the context of go guru? Is there an env var to
>> set, an option to add, a config file to change to control this behavior?
>>
>>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Fwd: [aos-devel] optimizing go guru

2017-12-05 Thread Luke Meyer
-- Forwarded message --
From: Luke Meyer <lme...@redhat.com>
Date: Tue, Dec 5, 2017 at 10:39 AM
Subject: Re: [aos-devel] optimizing go guru
To: Sebastian Jug <se...@redhat.com>
Cc: dev <d...@lists-openshift-redhat-com.vserver.prod.ext.phx2.redhat.com>




On Tue, Dec 5, 2017 at 9:36 AM, Sebastian Jug <se...@redhat.com> wrote:

> Sounds like you have got auto compile still on?
>
>
What does this mean in the context of go guru? Is there an env var to set,
an option to add, a config file to change to control this behavior?
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev