Closed tobyfan1980 closed 6 years ago
I tried with localhost. 0.5 second is unreasonable.
I dig in and find that the following line in bold in InfluxDBImpl constructor takes most of the time. What happened here?
public InfluxDBImpl(String url, String username, String password, Builder client) { this.logLevel = LogLevel.NONE; this.hostAddress = this.parseHostAddress(url); this.username = username; this.password = password; this.loggingInterceptor = new HttpLoggingInterceptor(); this.loggingInterceptor.setLevel(Level.NONE); this.gzipRequestInterceptor = new GzipRequestInterceptor(); this.retrofit = (new retrofit2.Retrofit.Builder()).baseUrl(url).client(client.addInterceptor(this.loggingInterceptor).addInterceptor(this.gzipRequestInterceptor).build()).addConverterFactory(MoshiConverterFactory.create()).build(); this.influxDBService = (InfluxDBService)this.retrofit.create(InfluxDBService.class); }
Can you please elaborate more details about your actual setup:
I tried with localhost. 0.5 second is unreasonable.
I dig in and find that the following line in bold in InfluxDBImpl constructor takes most of the time. What happened here?
public InfluxDBImpl(String url, String username, String password, Builder client) { this.logLevel = LogLevel.NONE; this.hostAddress = this.parseHostAddress(url); this.username = username; this.password = password; this.loggingInterceptor = new HttpLoggingInterceptor(); this.loggingInterceptor.setLevel(Level.NONE); this.gzipRequestInterceptor = new GzipRequestInterceptor(); this.retrofit = (new retrofit2.Retrofit.Builder()).baseUrl(url).client(client.addInterceptor(this.loggingInterceptor).addInterceptor(this.gzipRequestInterceptor).build()).addConverterFactory(MoshiConverterFactory.create()).build(); this.influxDBService = (InfluxDBService)this.retrofit.create(InfluxDBService.class); }