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

[dev.icinga.com #13113] Erraneous rendered event triggered #2614

Closed
icinga-migration opened this issue Nov 9, 2016 · 6 comments
Closed

[dev.icinga.com #13113] Erraneous rendered event triggered #2614

icinga-migration opened this issue Nov 9, 2016 · 6 comments
Labels
area/javascript Affects the javascript framework bug Something isn't working

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13113

Created by tgelf on 2016-11-09 16:32:28 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-11-09 17:53:28 +00:00 (in Redmine)


This happens in current master, v2.3.4 is fine. When a container reloads, all containers (even the unused col3) trigger a rendered event. This is wrong and hurts when you have one container refreshing fast with an overview list and another container with lots of HTML showing related details with no autorefresh but expensive onRendered handler.

Attachments

@icinga-migration
Copy link
Author

Updated by elippmann on 2016-11-09 17:07:38 +00:00

  • Status changed from New to Feedback
  • Assigned to set to tgelf
  • Target Version deleted 2.4.0

Hi Tom,

I can't confirm this. What are the steps to reproduce this?

Best regards,
Eric

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-09 17:12:06 +00:00

  • Status changed from Feedback to New
  • Assigned to deleted tgelf

All I did was adding a log-line to ActionTable.prototype.onRendered, like console.log('tbl rendered', container) and opened a view with a table in both containers, one of them refreshing every 10 secs. Got events for col1, col2 and col3 - with definitively no table in col3... checked out v2.3.4, behavior was as expected, stopped digging deeper. In case I can help you with more testing please let me know!

@icinga-migration
Copy link
Author

Updated by elippmann on 2016-11-09 17:19:19 +00:00

  • Status changed from New to Feedback
  • Assigned to set to tgelf

The initial page load does of course trigger events for all containers. This is true for the current master and 2.3.4. All subsequent AJAX requests only trigger the rendered event on the request's target container, as expected. Which view did you open?

tgelf wrote:

All I did was adding a log-line to ActionTable.prototype.onRendered, like console.log('tbl rendered', container) and opened a view with a table in both containers, one of them refreshing every 10 secs. Got events for col1, col2 and col3 - with definitively no table in col3... checked out v2.3.4, behavior was as expected, stopped digging deeper. In case I can help you with more testing please let me know!

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-09 17:52:31 +00:00

  • File added web2_rendered_events.png

Follow-up in relation to our chat a few minutes ago. First, v2.3.4 doesn't behave differently. The problem disappeared after adding the debug-line to JS and therefore reloading the page. Not really sure about that, I thought I reloaded twice?!

Initially there was col3 in the log, the table-related onRender got triggered for all containers after every request. No idea where it came from, honestly - unable to reproduce it right now. Might be another issue related to history handling, but I have no idea how to reproduce it.

I extended my logging, these are the events I'm seeing right now:

web2_rendered_events.png

Looks good so far to me. Guess we should blacklist application-state and menu, just to save a few CPU-cycles. Then we could close this issue. The rest can be handled in #13115.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-09 17:53:28 +00:00

  • Status changed from Feedback to New
  • Assigned to deleted tgelf

@icinga-migration icinga-migration added bug Something isn't working area/javascript Affects the javascript framework labels Jan 17, 2017
@lippserd
Copy link
Member

lippserd commented Jul 4, 2017

application-state relies on the rendered event. Blacklisting the rendered event for the menu means checking whether the container has the id menu which also consumes "some cycles". So I just leave it as it is and close this issue :).

@lippserd lippserd closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/javascript Affects the javascript framework bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants