Oh, I figured out the reason finally. It's caused by the lombok. After I changed all getters and setters with the trivial getters and setters, the completion time was reduced from 15 seconds to 2 seconds.
Thanks, Yunze On Fri, May 5, 2023 at 4:30 PM Yunze Xu <y...@streamnative.io> wrote: > > I think the configuration pojo is the issue. There are hundreds of > getters and setters. I did an experiment in my local env. First, copy > `ServiceConfiguration` to another class named > `PulsarServiceConfiguration`. Then write the following code > > ```java > PulsarServiceConfiguration conf = new PulsarServiceConfiguration(); > conf. > ``` > > and see how much time it would take between typing the dot symbol and > the popup window being shown on my Intellij Idea. > > - Default: about 15 seconds > - Remove the `@Getter`: about 5 seconds > - Remove the `@Setter`: about 4 seconds > > > one problem is that if split in this way, most config should change access > > by conf.getLoadBalancerConfiguration().getXXXXX(). > > It's unacceptable because it's a big breaking change. My idea is to > add another configuration class and mark `ServiceConfiguration` as > deprecated. Once a new config was added, add it to the new class. > > Thanks, > Yunze > > On Mon, May 1, 2023 at 2:13 PM Asaf Mesika <asaf.mes...@gmail.com> wrote: > > > > The Config file size is the issue or the configuration pojo ? > > > > On Sun, 30 Apr 2023 at 19:51 lifepuzzlefun <wjl_is_...@163.com> wrote: > > > > > current file is 3470 line with all pulsar configuration. > > > it is slow in my local ide. > > > > > > > > > 59 config in loadbalancer. > > > 17 config in metric. > > > 64 config in policies. > > > 41 config for bk client. > > > 50 for managed ledger. > > > 100+ for all other server cofig. > > > > > > > > > if split by category maybe more clear > > > > > > > > > class ServiceConfiguration { > > > LoadbalancerConfiguration > > > MetricConfiguration > > > BookkeeperClientConfiguration > > > .... > > > } > > > > > > > > > one problem is that if split in this way, most config should change access > > > by conf.getLoadBalancerConfiguration().getXXXXX(). > > > > > > > > > so most of the code base will be changed. > > > > > > > > > any ideas ? > > > > > > > > > > > >