You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Jeffrey Morlan <je...@everlaw.com> on 2018/06/05 22:45:40 UTC

Indexing API change causing existing plugin to severely degrade performance

Hi,

I'm the author of the "nbts" TypeScript Editor plugin (
http://plugins.netbeans.org/plugin/60605/typescript-editor,
https://github.com/Everlaw/nbts).

When I tested it in NetBeans 9.0 RC1, I saw major performance problems with
saving files, due to the change made to indexing in
https://netbeans.org/bugzilla/show_bug.cgi?id=270667. nbts needs to know
about all .ts files in a source root, so I return false from
CustomIndexerFactory#scanStarted - this used to only be applicable to the
initial scan when the root is first opened, but now it also affects live
changes. And on live changes, it affects ALL indexers! So, for example,
saving one .java file would end up recompiling the whole project.

I'll fix this in the next version of nbts (diff:
https://github.com/jeffreymorlan/nbts/commit/504f3dc6c7e721387b5597b66b0c0bc6fa30440b).
But, if someone using an existing version (<= 2.9.1.0) updates to NetBeans
9, they will get a severely degraded experience without the cause being
obvious.

Does NetBeans have a plugin blacklist that can prevent old versions from
being used?

(Also, was it really intentional that after the initial scan, scanStarted
returning false affects unrelated indexers?)

Thanks
Jeffrey

Re: Indexing API change causing existing plugin to severely degrade performance

Posted by Emilian Bold <em...@protonmail.ch>.
Don't know that code but sounds like this event is specific for the module-info file change and you just send it for any file change now?

Indeed, why not add some extra boolean or event type to differentiate? Then all the existing projects / code should work the same...

--emi

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On 6 June 2018 10:17 AM, Tomas Zezula <to...@oracle.com> wrote:

> Hi,
> 
> the problem is that in Java 9 the change of file (module-info) needs to force whole root scan, and it cannot be controlled by the ClassPath event as it’s late (as described in the issues).
> 
> The repository updater started to call scanStarted even for file changes to allow it.
> 
> I will think if there is some other possibility (java module specific).
> 
> Another option is to send more info (why it’s called) into scanStarted.
> 
> — Tomas
> 
> > On 6 Jun 2018, at 05:35, Jaroslav Tulach jaroslav.tulach@gmail.com wrote:
> > 
> > Dne středa 6. června 2018 0:45:40 CEST, Jeffrey Morlan napsal(a):
> > 
> > > Hi,
> > > 
> > > I'm the author of the "nbts" TypeScript Editor plugin (
> > > 
> > > https://urldefense.proofpoint.com/v2/url?u=http-3A__plugins.netbeans.org_plugin_60605_typescript-2Deditor&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=-pmI80w62VdET56z1i2lHDymhhR3qTLvraG49qtn8qg&e=,
> > > 
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Everlaw_nbts&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=JDu1MCamFWS2OL6s6GlV5KNT4DDMG6ojzVs_v79Kaps&e=).
> > 
> > Typescript plugin is (going to be) more and more important, I'd say! I am
> > 
> > forwarding this message directly to Tomáš Zezula, the guy from #270667...
> > 
> > Tomáši, can you please look at Jeffrey's inquiry?
> > 
> > -jt
> > 
> > > When I tested it in NetBeans 9.0 RC1, I saw major performance problems with
> > > 
> > > saving files, due to the change made to indexing in
> > > 
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__netbeans.org_bugzilla_show-5Fbug.cgi-3Fid-3D270667&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=ioJDO9OW2jXmdYUwYkbJ385jxyKg2ow9fAGVip4UCWU&e=. nbts needs to know
> > > 
> > > about all .ts files in a source root, so I return false from
> > > 
> > > CustomIndexerFactory#scanStarted - this used to only be applicable to the
> > > 
> > > initial scan when the root is first opened, but now it also affects live
> > > 
> > > changes. And on live changes, it affects ALL indexers! So, for example,
> > > 
> > > saving one .java file would end up recompiling the whole project.
> > > 
> > > I'll fix this in the next version of nbts (diff:
> > > 
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jeffreymorlan_nbts_commit_504f3dc6c7e721387b5597b66b0c0bc&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=kGfO9-M2JcdfLKGuAH7BLlupMKRVmoRpq2B24UPlNrI&e=
> > > 
> > > 6fa30440b). But, if someone using an existing version (<= 2.9.1.0) updates
> > > 
> > > to NetBeans 9, they will get a severely degraded experience without the
> > > 
> > > cause being obvious.
> > > 
> > > Does NetBeans have a plugin blacklist that can prevent old versions from
> > > 
> > > being used?
> > > 
> > > (Also, was it really intentional that after the initial scan, scanStarted
> > > 
> > > returning false affects unrelated indexers?)
> > > 
> > > Thanks
> > > 
> > > Jeffrey
> > 
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> > 
> > For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> > 
> > For further information about the NetBeans mailing lists, visit:
> > 
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache.org_confluence_display_NETBEANS_Mailing-2Blists&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=Jli_JcrGR9GNTDQTUEH6owXXGnv304H8OY9DGu5cIIY&e=
> 
> --
> 
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> 
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> 
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Indexing API change causing existing plugin to severely degrade performance

Posted by Tomas Zezula <to...@oracle.com>.
Hi,
the problem is that in Java 9 the change of file (module-info) needs to force whole root scan, and it cannot be controlled by the ClassPath event as it’s late (as described in the issues).
The repository updater started to call scanStarted even for file changes to allow it.
I will think if there is some other possibility (java module specific).
Another option is to send more info (why it’s called) into scanStarted.

— Tomas

> On 6 Jun 2018, at 05:35, Jaroslav Tulach <ja...@gmail.com> wrote:
> 
> Dne středa 6. června 2018 0:45:40 CEST, Jeffrey Morlan napsal(a):
>> Hi,
>> 
>> I'm the author of the "nbts" TypeScript Editor plugin (
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__plugins.netbeans.org_plugin_60605_typescript-2Deditor&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=-pmI80w62VdET56z1i2lHDymhhR3qTLvraG49qtn8qg&e=,
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Everlaw_nbts&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=JDu1MCamFWS2OL6s6GlV5KNT4DDMG6ojzVs_v79Kaps&e=).
> 
> Typescript plugin is (going to be) more and more important, I'd say! I am 
> forwarding this message directly to Tomáš Zezula, the guy from #270667...
> 
> Tomáši, can you please look at Jeffrey's inquiry?
> -jt
> 
> 
>> 
>> When I tested it in NetBeans 9.0 RC1, I saw major performance problems with
>> saving files, due to the change made to indexing in
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__netbeans.org_bugzilla_show-5Fbug.cgi-3Fid-3D270667&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=ioJDO9OW2jXmdYUwYkbJ385jxyKg2ow9fAGVip4UCWU&e=. nbts needs to know
>> about all .ts files in a source root, so I return false from
>> CustomIndexerFactory#scanStarted - this used to only be applicable to the
>> initial scan when the root is first opened, but now it also affects live
>> changes. And on live changes, it affects ALL indexers! So, for example,
>> saving one .java file would end up recompiling the whole project.
>> 
>> I'll fix this in the next version of nbts (diff:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jeffreymorlan_nbts_commit_504f3dc6c7e721387b5597b66b0c0bc&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=kGfO9-M2JcdfLKGuAH7BLlupMKRVmoRpq2B24UPlNrI&e=
>> 6fa30440b). But, if someone using an existing version (<= 2.9.1.0) updates
>> to NetBeans 9, they will get a severely degraded experience without the
>> cause being obvious.
>> 
>> Does NetBeans have a plugin blacklist that can prevent old versions from
>> being used?
>> 
>> (Also, was it really intentional that after the initial scan, scanStarted
>> returning false affects unrelated indexers?)
>> 
>> Thanks
>> Jeffrey
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache.org_confluence_display_NETBEANS_Mailing-2Blists&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=5Ei26fil1N-L1LPJCVJDQcQDr6tSaKpZbb2SwprptDA&m=h6yoDwjPQDHId2Vwj7f3Zrtj5GwQZpfZSHM_-6K3N8E&s=Jli_JcrGR9GNTDQTUEH6owXXGnv304H8OY9DGu5cIIY&e=
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Indexing API change causing existing plugin to severely degrade performance

Posted by Jaroslav Tulach <ja...@gmail.com>.
Dne středa 6. června 2018 0:45:40 CEST, Jeffrey Morlan napsal(a):
> Hi,
> 
> I'm the author of the "nbts" TypeScript Editor plugin (
> http://plugins.netbeans.org/plugin/60605/typescript-editor,
> https://github.com/Everlaw/nbts).

Typescript plugin is (going to be) more and more important, I'd say! I am 
forwarding this message directly to Tomáš Zezula, the guy from #270667...

Tomáši, can you please look at Jeffrey's inquiry?
-jt


> 
> When I tested it in NetBeans 9.0 RC1, I saw major performance problems with
> saving files, due to the change made to indexing in
> https://netbeans.org/bugzilla/show_bug.cgi?id=270667. nbts needs to know
> about all .ts files in a source root, so I return false from
> CustomIndexerFactory#scanStarted - this used to only be applicable to the
> initial scan when the root is first opened, but now it also affects live
> changes. And on live changes, it affects ALL indexers! So, for example,
> saving one .java file would end up recompiling the whole project.
> 
> I'll fix this in the next version of nbts (diff:
> https://github.com/jeffreymorlan/nbts/commit/504f3dc6c7e721387b5597b66b0c0bc
> 6fa30440b). But, if someone using an existing version (<= 2.9.1.0) updates
> to NetBeans 9, they will get a severely degraded experience without the
> cause being obvious.
> 
> Does NetBeans have a plugin blacklist that can prevent old versions from
> being used?
> 
> (Also, was it really intentional that after the initial scan, scanStarted
> returning false affects unrelated indexers?)
> 
> Thanks
> Jeffrey





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists