{"action":"opened","issue":{"url":"https://api.github.com/repos/UweSchmidt/hxt/issues/49","labels_url":"https://api.github.com/repos/UweSchmidt/hxt/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/UweSchmidt/hxt/issues/49/comments","events_url":"https://api.github.com/repos/UweSchmidt/hxt/issues/49/events","html_url":"https://github.com/UweSchmidt/hxt/issues/49","id":98113166,"number":49,"title":"Processing of specific children is slow","user":{"login":"mrkkrp","id":8165792,"avatar_url":"https://avatars.githubusercontent.com/u/8165792?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkkrp","html_url":"https://github.com/mrkkrp","followers_url":"https://api.github.com/users/mrkkrp/followers","following_url":"https://api.github.com/users/mrkkrp/following{/other_user}","gists_url":"https://api.github.com/users/mrkkrp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkkrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkkrp/subscriptions","organizations_url":"https://api.github.com/users/mrkkrp/orgs","repos_url":"https://api.github.com/users/mrkkrp/repos","events_url":"https://api.github.com/users/mrkkrp/events{/privacy}","received_events_url":"https://api.github.com/users/mrkkrp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-30T08:35:20Z","updated_at":"2015-07-30T08:35:20Z","closed_at":null,"body":"Hello. I'm using the following technique to transform children that have\r\nparticular features:\r\n\r\n```haskell\r\n(/>/) :: ArrowXml a => String -> a XmlTree XmlTree -> a XmlTree XmlTree\r\nname />/ action = processChildren $ action `when` (isElem >>> hasName name)\r\n```\r\n\r\nAs you can see this applies `action` to all children that has name\r\n`name`. Example of usage:\r\n\r\n```haskell\r\nsomething = \"tracklist\" />/ inList \"track\" (\"obj\" />/ procTrack m)\r\n```\r\n\r\nwhere `procTrack` does some actual processing and `inList` maybe defined\r\nusing the same technique:\r\n\r\n```haskell\r\ninList :: ArrowXml a => String -> a XmlTree XmlTree -> a XmlTree XmlTree\r\ninList name action = processChildren $ action `when` isList name\r\n```\r\n\r\netc.\r\n\r\nNow, I've noticed that this is not very efficient for large XML documents,\r\nand my only question is whether my approach idiomatic and correct in general\r\nand the slowness of the processing is natural consequence of document size.\r\n\r\nI've searched documentation of HXT, but couldn't find primitive that does\r\nsomething similar to my `(/>/)`, although I'm still thinking it should\r\nexist, because from my point of view this is extremely useful.\r\n\r\nCan I improve my code somehow or it's how it should be coded with HXT?\r\n"}}