The formula for an advance/royalty arrangement is pretty much the same as it has always been. Generally speaking, a publisher has to sell 10,000 copies of a title to make a profit. Remember that whatever the selling price of the book is, the bookstore as the middleman, takes up to 50%, and there are returns to deal with.
The only way a publisher can trim costs are in content acquisition, production and printing. Twenty years ago, nearly all mass market books were printed in Asia to get the costs down. Today you can find great four-color web presses in the U.S. that offer very competitive prices. Binding automation has come a long way. Plus the time to market is vastly reduced, meaning publishers can come to market much faster. Self-publishing has certainly been a disrupter but traditional publishing has benefited as well.