Back in the day when cartridge firearms were loaded with black powder, how did the gun manufacturers determine the proper barrel length for maximum efficiency of their known boolit (calibre and weight) and their known powder charge?
Did they have a formula or was it a "hit and miss" (pun intended) proposition? There were centuries of experience with black powder prior to cartridge ammunition. In my best guess, there must have been some reference material written down somewhere. The Davenport Formula doesn't apply as it's to determine powder charge for a known ball and a known barrel.
If one was going to build a rifle for a new black powder cartridge, how would they determine the optimum barrel length?