The current Porsche museum is very small and you could see it in anything from 5 minutes to 1 hour (depending upon how much you want to read each little plaque by each car and how many photos you want to take).

AFAIK the new museum (which is much, much bigger) is still being built. I don't know when it will be completed.

The factory tour will last 90 minutes.

You could enjoy lunch in the "Guest Casino" which the VIP restaurant that visitors can eat in.