Barrel length won't result in a practical change in peak pressure, so the data indicating what powder charge masses are safely within specificed and tested pressures does not vary with barrel length. However, substantial changes in barrel length can affect what powder is best suited. Most people observe that the powder that produces the highest velocity in a long barrel will also produce the highest velocity in a short barrel. Even so, the efficiency and economy of slow-burning powders is comparatively poor. While they do deliver higher velocity in short barrels, they deliver much more in longer barrels. For example, you may use twice as much of a slow-burning powder to get 500 fps more out of a long barrel, but will still burn that double mass of powder only to get 50 fps more out of the shortest barrel.
If it's not barrel length, what is the factor that determines when a powder is too slow for a gun? Is it the chamber and case volume? The ratio of case volume to bore diameter?