For spousal sponsorship, you have 2 available types of application, inland and outland.
If you apply inland, you are in Canada and you are requesting that your file is processed in Canada. If you apply for a work permit at the same time, you may get it at the same time as your first stage approval which is in 5 to 6 months time normally. If there is a problem with your file, you may be refused and you would not have the option to appeal or your file also might get sent to a local office in Canada for further scrutiny and that may delay it for a year or more depending on how busy the local office is. While an inland application is in process, you are not advised to leave Canada since if you are refused to return for whatever reason, your application would automatically get cancelled since you are not in Canada anymore. With inland application if all goes well, you can have your PR in a year or maybe 1 and a half.
If you apply outland, regardless of whether you are in Canada or not, you can ask for your file to be processed in your homeland. Then it takes about a month to approve sponsor and then your file goes to your homeland. You can see the processing time at http://www.cic.gc.ca/english/information/times/international/05-fc-spouses.asp#europe and the average for London for example is 4 months and then you would actually get your PR. If they are suspicious of your application, they may call you in for an interview which would happen in London. If they refuse you, you can appeal but this may delay you up to a year. While you are applying outland, you can travel back and forth if you want to.
Whichever you do, make sure you are legal in Canada by applying to extend your visit visa before it expires.