Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app reloads on search #2488

Closed
colmaengus opened this issue Jul 14, 2016 · 13 comments
Closed

app reloads on search #2488

colmaengus opened this issue Jul 14, 2016 · 13 comments
Assignees
Milestone

Comments

@colmaengus
Copy link

Problem description

app reloads when you click search

Steps to reproduce the problem

  1. Navigate to Search tab in application
  2. Click the search icon and the whole application reloads rather than using XHR to perform search

Environment

  • Graylog Version: 2.0.3-2
  • Elasticsearch Version:
  • MongoDB Version:
  • Operating System: docker (brower on windows)
  • Browser version: chrome 51.0.2704.103 m
@gruselglatz
Copy link

gruselglatz commented Jul 20, 2016

We are facing the same problems since 2.0.3.
Searches now take 10+ seconds, this makes it really unusable.
It doesn't depends on the amount of messages, i only have 50 Messages in this setup so far.

Environment

Graylog Version: 2.0.3 (f07c170), codename Rothaus
Elasticsearch Version:
MongoDB Version:
Operating System: CentOS 7
Browser version: chrome 50.0.2661.102 m

When it's helpful i could provide you with our timeline-log.

@edmundoa
Copy link
Contributor

Hi @gruselglatz,

I wonder if there is some issue in your setup when loading the page takes more than 10 seconds. Did you check where the time is being used?

@gruselglatz
Copy link

I used the Chrome TimelineTool and i could share it with you, if it would be helpful. I'm not a Webdeveloper, so i can't read much out of it.

@edmundoa
Copy link
Contributor

@gruselglatz That would be great. I'm not sure how helpful it would be, but at least I can take a look and see if I can extract something from it. Thank you!

@gruselglatz
Copy link

@edmundoa I've sent it to you via Email. I hope you could see something.

@edmundoa
Copy link
Contributor

@gruselglatz email received, thank you!

@gruselglatz
Copy link

gruselglatz commented Jul 20, 2016

UDAPTE: After i dismissed the "First Start Help" the Search now loads in half the time: 4-6 seconds.

Scripts name Time
https://xxxx.local/plugin/org.graylog.plugins.pipelineprocessor.ProcessorPlugin/plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.124facd49c87779f691b.js 1,27s

https://xxxx.local/plugin/org.graylog.plugins.map.MapWidgetPlugin/plugin.org.graylog.plugins.map.MapWidgetPlugin.3a6e86e960b80407f74e.js 1,37s

https://xxxx.local/plugin/org.graylog.plugins.collector.CollectorPlugin/plugin.org.graylog.plugins.collector.CollectorPlugin.74e8dfee2c1d6b11bc87.js 0,5s

https://graylogtest.xxxx.local/plugin/org.graylog.plugins.pipelineprocessor.ProcessorPlugin/plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.124facd49c87779f691b.js 0,5s AND 0,4s

https://xxxx.local/plugin/org.graylog.plugins.enterprise_integration.EnterpriseIntegrationPlugin/plugin.org.graylog.plugins.enterprise_integration.EnterpriseIntegrationPlugin.7f1e11d52a66d206799c.js 0,5s

https://xxxx.local/4.4.f2a88026f0d0e7332f17.js 1,31s

UPDATE 2:

I don't know why the enterprise, collector and map plugin always gets loaded and executed, so i moved the plugins out, and i save additional 3 seconds of loading time....

@dennisoelkers
Copy link
Member

Can you see what takes so long? Connection buildup, downloading JS, interpreting, running?

@gruselglatz
Copy link

gruselglatz commented Jul 20, 2016

@dennisoelkers i have sent three of my timeline logs to @edmundoa maybe he could send it to you for further investigations. I've listed the names of the scripts that were on top of the "fire-graph", where i can see what time is used for Connection buildup, downloading JS, interpreting, running?

EDIT: is this what you want?

Total: 8.85 s
130.4 ms Loading
6650.7 ms Scripting
332.6 ms Rendering
33.1 ms Painting
422.7 ms Other
1277.2 ms Idle

@hc4
Copy link
Contributor

hc4 commented Jul 28, 2016

I found Interesting thing.
In search mode, if you click image tab - view refreshes very fast, but if you click image button - it will reload whole app and take 5 seconds.

I have graylog 2.1.0-beta1

@gruselglatz
Copy link

@hc4 i can confirm that on 2.0.3 also.

It seems when you hit only the "Search"-tab none of the exhausting functions get called. only the "PiplineProcessorPlugin"-function.

So after the Mouse-Click-Event it takes 336ms for scripts to run and 1,9ms for rendering the new messages. Compare that to the other values above.

@edmundoa
Copy link
Contributor

edmundoa commented Jul 29, 2016

That is an expected behaviour since 2.0.x, @hc4 and @gruselglatz. The reason for this is mostly legacy now, but we still need to do some clean up to use the new search stores to fetch data instead of submitting the form as it was done in previous versions.

@edmundoa edmundoa self-assigned this Sep 6, 2016
edmundoa pushed a commit that referenced this issue Sep 7, 2016
When changing the search page or histogram resolution, do not force a
full page reload, but change the URL. That triggers an update of the
stores involved in the search.

Refs #2488
edmundoa pushed a commit that referenced this issue Sep 7, 2016
Prevent the submit of new searches, and change the URL instead. That
triggers an update on the stores involved in the search page.

Refs #2488
edmundoa pushed a commit that referenced this issue Sep 7, 2016
Instead replace URL and let search stores to fetch new data.

Refs #2488
@edmundoa edmundoa added this to the 2.1.1 milestone Sep 7, 2016
dennisoelkers pushed a commit that referenced this issue Sep 9, 2016
* Avoid page reload when a search param changes

When changing the search page or histogram resolution, do not force a
full page reload, but change the URL. That triggers an update of the
stores involved in the search.

Refs #2488

* Avoid page reload on search submit

Prevent the submit of new searches, and change the URL instead. That
triggers an update on the stores involved in the search page.

Refs #2488

* Use latest search to get widget parameters

Delay fetching search parameters to create widgets until the last
moment, so we ensure the parameters used are the ones from the latest
search performed.

* Avoid page reload when loading saved search

Instead replace URL and let search stores to fetch new data.

Refs #2488

* Fix search page sorting

After the last changes in the search reload behaviour, remove the
`sortField` and `sortOrder` options from `SearchResult`'s state and rely
on `SearchStore` to provide the right values.

* Add search loading indicator

Since we don't reload the search page now, we need a way of giving
feedback to the user when the search is being loaded. This commit
introduces a loading indicator in the bottom right corner of the screen
for such purpose.

* Remove unused openLink method

* Make search loading indicator reusable
dennisoelkers pushed a commit that referenced this issue Sep 9, 2016
* Avoid page reload when a search param changes

When changing the search page or histogram resolution, do not force a
full page reload, but change the URL. That triggers an update of the
stores involved in the search.

Refs #2488

* Avoid page reload on search submit

Prevent the submit of new searches, and change the URL instead. That
triggers an update on the stores involved in the search page.

Refs #2488

* Use latest search to get widget parameters

Delay fetching search parameters to create widgets until the last
moment, so we ensure the parameters used are the ones from the latest
search performed.

* Avoid page reload when loading saved search

Instead replace URL and let search stores to fetch new data.

Refs #2488

* Fix search page sorting

After the last changes in the search reload behaviour, remove the
`sortField` and `sortOrder` options from `SearchResult`'s state and rely
on `SearchStore` to provide the right values.

* Add search loading indicator

Since we don't reload the search page now, we need a way of giving
feedback to the user when the search is being loaded. This commit
introduces a loading indicator in the bottom right corner of the screen
for such purpose.

* Remove unused openLink method

* Make search loading indicator reusable

(cherry picked from commit f51e5ca)
@bernd
Copy link
Member

bernd commented Sep 12, 2016

This has been fixed in #2798 and will be included in the upcoming 2.1.1 release.

@bernd bernd closed this as completed Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants