Chris Woakes took 3-39 as Sri Lanka were dismissed for 288 on day three of the third Test at Lord's but three Nuwan Pradeep wickets helped the tourists restrict England to 109-4 overnight.
Steven Finn, James Anderson and Stuart Broad took two wickets apiece on Saturday as the tourists added just 126 runs to their overnight 162-1.
Kusal Perera (42) and Rangana Herath (31) offered some resistance before Anderson's claimed the scalp of the former. That took him and Broad to a combined 494 wickets when they have opened the bowling together, above previous record holders Wasim Akram and Waqar Younis (493).
England started well but Compton (19) fell cheaply, before Nuwan Pradeep clean bowled Joe Root (four), James Vince (0) and Johhny Bairstow (32).
Alex Hales (41 not out) and nightwatchman Steven Finn (six not out) helped England to a 237-run lead by the close of play.
Earlier in the day, England captain Alastair Cook went off for an x-ray on his knee after being struck while fielding at silly mid-off.
Click on the video above to watch the best of action from day three at Lord's. Coverage of day four of the third Investec Test is live on Sky Sports 2 from 10.30am on Sunday.