Filing a case against IRCC through lawyer. You can search that word in this forum of Citizenship. You will be able to find a number of discussions. I came to know from here. This is my interpretation of this.
It is good to file it (usually costs around $800 to $1500 depending on the immigration lawyer you are using, there is one which some people have used and he charges $800, consideration should be given that the lawyer you are using, is experienced in filing these mandamus before) once your standard timeline has crossed which is nowadays, 24 months. So you are good beyond that limit. Once IRCC receives it, in 90% of the cases, they will wrap up the case if its getting delayed because of their negligence. If its something beyond them, even then they are bound to give you result.
I remember reading a case, where it was delayed for many many years like your case, then they went on to filing the case, and in that case, it went beyond filing mandamus alone. If IRCC doesn't expedite on mandamus, then i am not fully sure how the process goes, but what i know then the case proceeds to the next stage ultimately going to first hearing, each step of the process incorporates the cost of lawyer at your end. Only filing mandamus is around $800 to $1500. Each stage has its cost and when it is finally scheduled to be hard by judge then usually lawyers charge for each visit to court. But details you can discuss with lawyer you chose as how the process proceeds and charges associated with it.
So, in the case which i read, it went to hearing stage and IRCC came up with explanation that its with 3rd party, they are doing the clearance and IRCC is pending their results. But court gave decision that for client, its IRCC, doesn't matter which 3rd or 4th party which IRCC further incorporates, IRCC is responsible and should provide the result. And later, that guy's case was proceeded swiftly and he got citizenship.
What i understand very little bit about court system, once there is a decision, if next case is same, then the chances of positive decision is very high in next similar case. So, i hope so you will get your citizenship soon if you follow this path.