Inspite of Rick's advice to go a little later in the morning to Topkapi Palace or Hagia Sophia, unfortunately the lines just to buy tickets are very long and then the line to get through security is like a busy airport security line. We decided to go back at 12 noon, hoping that at least all the tour groups would be going for lunch. It has worked so far. Much shorter ticket lines and no wait to go through security. Another tip is to use the automatic ticket machines, instead of waiting at the ticket office, lines there are much shorter.