Drove my 2007 E90 335i from 30k-99k miles with minor problems like HPFP once, LPFP once, 2 o2 sensors and both wastegate actuators once. I was tuned through out the 70k miles too. Besides these problems I stated the car was pretty solid considering I put these 70k miles on my car in less than 2 years...Was driving back and forth from SD to LA 4 days a weak :-/
My 2010 E90 M 335i has been an AMAZING car so far. Purchased it with 17k miles and I've literally had zero problems. I haven't been to the dealer for any work in over 5 months which is pretty amazing considering I'm tuned, FBO and running e-85. I think BMW finally fixed all the bugs on the 2010 models since it was the last cycle of N54's.
My buddies 2011 E92 M 335i (N55) has been in and out of the dealer several times. He hates the car. He's had it shut off while driving on the freeway..., transmission problems etc. and oh yeah, it's slow.
I think you might have just bought one of those problematic 335's :-/