{"action":"created","issue":{"url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/70","repository_url":"https://api.github.com/repos/orocos-toolchain/rtt","labels_url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/70/comments","events_url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/70/events","html_url":"https://github.com/orocos-toolchain/rtt/pull/70","id":46398606,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNDEzMjQ=","number":70,"title":"updateHook() called too often","user":{"login":"psoetens","id":29791,"node_id":"MDQ6VXNlcjI5Nzkx","avatar_url":"https://avatars1.githubusercontent.com/u/29791?v=4","gravatar_id":"","url":"https://api.github.com/users/psoetens","html_url":"https://github.com/psoetens","followers_url":"https://api.github.com/users/psoetens/followers","following_url":"https://api.github.com/users/psoetens/following{/other_user}","gists_url":"https://api.github.com/users/psoetens/gists{/gist_id}","starred_url":"https://api.github.com/users/psoetens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psoetens/subscriptions","organizations_url":"https://api.github.com/users/psoetens/orgs","repos_url":"https://api.github.com/users/psoetens/repos","events_url":"https://api.github.com/users/psoetens/events{/privacy}","received_events_url":"https://api.github.com/users/psoetens/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"psoetens","id":29791,"node_id":"MDQ6VXNlcjI5Nzkx","avatar_url":"https://avatars1.githubusercontent.com/u/29791?v=4","gravatar_id":"","url":"https://api.github.com/users/psoetens","html_url":"https://github.com/psoetens","followers_url":"https://api.github.com/users/psoetens/followers","following_url":"https://api.github.com/users/psoetens/following{/other_user}","gists_url":"https://api.github.com/users/psoetens/gists{/gist_id}","starred_url":"https://api.github.com/users/psoetens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psoetens/subscriptions","organizations_url":"https://api.github.com/users/psoetens/orgs","repos_url":"https://api.github.com/users/psoetens/repos","events_url":"https://api.github.com/users/psoetens/events{/privacy}","received_events_url":"https://api.github.com/users/psoetens/received_events","type":"User","site_admin":false},"assignees":[{"login":"psoetens","id":29791,"node_id":"MDQ6VXNlcjI5Nzkx","avatar_url":"https://avatars1.githubusercontent.com/u/29791?v=4","gravatar_id":"","url":"https://api.github.com/users/psoetens","html_url":"https://github.com/psoetens","followers_url":"https://api.github.com/users/psoetens/followers","following_url":"https://api.github.com/users/psoetens/following{/other_user}","gists_url":"https://api.github.com/users/psoetens/gists{/gist_id}","starred_url":"https://api.github.com/users/psoetens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psoetens/subscriptions","organizations_url":"https://api.github.com/users/psoetens/orgs","repos_url":"https://api.github.com/users/psoetens/repos","events_url":"https://api.github.com/users/psoetens/events{/privacy}","received_events_url":"https://api.github.com/users/psoetens/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2014-10-21T14:18:31Z","updated_at":"2018-11-15T11:03:04Z","closed_at":"2015-04-30T11:24:41Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/orocos-toolchain/rtt/pulls/70","html_url":"https://github.com/orocos-toolchain/rtt/pull/70","diff_url":"https://github.com/orocos-toolchain/rtt/pull/70.diff","patch_url":"https://github.com/orocos-toolchain/rtt/pull/70.patch"},"body":"As discussed in length in this forum thread: http://www.orocos.org/forum/rtt/rtt-dev/changing-behaviour-updatehook :\n\nWe have observed lately two major issues:\n\n> 1. updateHook() is called _too many times_ (even according to\n>    specifications), especially when 'OwnThread' operations are implemented OR\n>    called(!).\n>    -> This was due to internal bookkeeping of the ExecutionEngine to dispatch\n>    the asynchronous requests. Users found it confusing that updateHook was\n>    called during the use of operations. This also kills performance of Lua\n>    state machines\n>    sitting in updateHook(), since they are evaluated too many times.\n> 2. Installing a callback for an event port caused calling that callback AND\n>    updateHook(), instead of calling only the callback.\n>    -> The callback does not replace the call to updateHook(). This is also\n>    related to users being surprised that an event port callback is only called\n>    periodically in periodic threads, while they thought it would be called\n>    immediately upon each event reception, and eventually updateHook\n>    periodically (but serialized with the callbacks).\n> \n> The idea then rose to have updateHook() to only be called after:\n> 1) any call to TaskContext::trigger()\n> -> for activities which allow this user control\n> 2) the component's activity triggered itself (periodic, file descriptor,\n> ...)\n> -> what users expect\n> 3) the component is being update()\n> -> for slave activity behavior\n\nI'm creating a simple patch that addresses both issues, in a backwards compatible way.\n"},"comment":{"url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/comments/439002455","html_url":"https://github.com/orocos-toolchain/rtt/pull/70#issuecomment-439002455","issue_url":"https://api.github.com/repos/orocos-toolchain/rtt/issues/70","id":439002455,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTAwMjQ1NQ==","user":{"login":"ahoarau","id":703240,"node_id":"MDQ6VXNlcjcwMzI0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/703240?v=4","gravatar_id":"","url":"https://api.github.com/users/ahoarau","html_url":"https://github.com/ahoarau","followers_url":"https://api.github.com/users/ahoarau/followers","following_url":"https://api.github.com/users/ahoarau/following{/other_user}","gists_url":"https://api.github.com/users/ahoarau/gists{/gist_id}","starred_url":"https://api.github.com/users/ahoarau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahoarau/subscriptions","organizations_url":"https://api.github.com/users/ahoarau/orgs","repos_url":"https://api.github.com/users/ahoarau/repos","events_url":"https://api.github.com/users/ahoarau/events{/privacy}","received_events_url":"https://api.github.com/users/ahoarau/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T11:03:04Z","updated_at":"2018-11-15T11:03:04Z","author_association":"CONTRIBUTOR","body":"I'm seeing a very strange problem where my updatehook is called too often too.\r\nI set a periodic component at HighestPriority + ORO_SCHED_RT, period of 2ms.\r\nInside this component I'm computing the period : \r\n```c++\r\n    update_period_s = TimeService::Instance()->secondsSince(last_updatehook_ticks);\r\n    last_updatehook_ticks = TimeService::Instance()->getTicks();\r\n```\r\nPeriod is perfect for a while (like 2ms +- 0.01ms for ex).\r\nI set the system under load.\r\nAfter a random amount of time the computed period becomes 0.2ms (!!), like if something was triggering the updatehook(), making the CPU goes to 100%. There is no `trigger()` inside this component.\r\nI'm using the latest 2.9 branch.\r\n"}}
{"actor":{"display_login":"ahoarau"}}