I'm seeing two separate problems here:
- The performance of your application is less than optimal
- The size of your application code base and the challenges that go with combining a test code base with the application code base.
For the performance issues, you will want to run separate performance tests to identify bottlenecks and remove them. If the application is having performance issues prior to release, it will likely have massive performance issues after release unless your team works on this.
For your test code vs your application code, it's really a question of whether the advantages of one approach outweigh the other - if they do, your choice is pretty easy. If not, it comes down to personal preferences.
Advantages of Combining Test and Application Code
- Source control and keeping test and application code in sync is much easier when test and application code are part of the same solution.
- Automated build management works more cleanly with test and application code in the same solution.
- It is easier to reference individual application function directly when test and application code is in the same solution.
- You will never need to worry about running the test code against the wrong version of the application.
Disadvantages of Combining Test and Application Code
- The larger your application gets, the larger you test code-base gets, which can cause issues during a single build process.
- Any change to the application code will force a build of the test code, even if the application change has no impact on test code (e.g. correcting a spelling error in a caption).
- Closely linking test and application code makes it easier to introduce unwanted dependencies.
These are not exhaustive lists. There are other advantages and disadvantages to each approach.