Short answer: all of the above.
The most important factor here is your preference category when applying for a green card. There are 3 buckets, EB-1, EB-2, and EB-3, in decreasing order of desirability. Which bucket you fall into is a combination of your degree(s) and your relevant work experience.
Each bucket has a longer wait than the previous.
The second factor is your country of origin - the system is quota'ed based on it, so the more applicants coming from your country of origin the longer the line is. For the most part this is a minor factor except if you're from China or India, in which case you're pretty fucked.
I believe (though I'm not sure) there are also other ways to expedite processing for $$$, but this mostly surrounds various form filings that can otherwise take months to process. The actual line itself cannot be shortened.