title: Is getElementById() efficient?
body: <p>I often use the method <code>getElementById("id1");</code> in my methods. I use it to find certain elements in my HTML. I wonder if I need to be concerned about how much I use it if it has to search the entire DOM every time. </p>
  
  <p>How does this method work? Does it parse the DOM and return the element when it is found, or does it have all those values indexed somehow and so is able to return more quickly?</p>
  
  <p>P.S. I am curious about the method in general, but I am using an Android WebView if that makes any difference.</p>