What is an efficient way to produce phrase anagrams given a string? 

**The problem I am trying to solve**

Assume you have a word list with *n* words. Given an input string, say, "peanutbutter", produce all phrase anagrams. Some contenders are: pea nut butter, A But Ten Erupt, etc. 

**My solution**

I have a trie that contains all words in the given word list. Given an input string, I calculate all permutations of it. For each permutation, I have a recursive solution (something like [this](http://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/)) to determine if that specific permuted string can be broken in to words. For example, if one of the permutations of peanutbutter was "abuttenerupt", I used this method to break it into "a but ten erupt". I use the trie to determine if a string is a valid word.

**What sucks**

My problem is that because I calculate all permutations, my solution runs very slow for phrases that are longer than 10 characters, which is a big let down. I want to know if there is a way to do this in a different way. 
Websites like <https://wordsmith.org/anagram/> can do the job in less than a second and I am curious to know how they do it.