Well without something a little more specific I'll have a bit of difficulty helping.
I just got a 940k block ship with 16 turrets and docked that to an identical ship and then docked the combined ship to a 10mil+ block station with 40+ turrets and rail door etc.. without any noticeable lag in single player. I was using the pickup rail touching the docking rail so i hit the station a couple times before docking still without lag. My computer is intel i7 3.3Ghz 6 core, NVidia GTX980 and 64GB of memory which is comparable to your system. The extra memory is limited by the limit set for starmade. Since the maximum memory I've ever used in starmade is around the 6GB mark there shouldn't be any difference between have 8GB to any amount of memory.
So I can only think of a few things that might be causing issues for you.
1. Number of collision calculations. One is you have a lot of turrets/rail docked stuff grouped close together which multiplies collision lag badly when you get close to something else. The number of docked entities for collision calculations gets for worse for each extra one. Area triggers also causes a lot of lag as it has to check if anything is in the same area as each area trigger block. So I don't use area triggers for large scale hanger doors.
2. Memory Limits. There is enough stuff in game to use more than the memory limit allocated to starmade/java. I don't think you can run starmade on the 32bit java so I'll assume everyone is on 64bit java. My max memory setting for starmade is 16gb and I think the max I've used is around 6GB. I'm not sure what the default setting is for a fresh install. So you might want to check this setting if you haven't already.
3. Less likely but possible. Update java to the latest version. There here is the catch the starmade launcher loses the java install location every time you update java as the install folder changes. So you have to tell the launcher where the new version is.
4. Is this docking to a planet? The size of some of the planet plates get so large I imagine there might be a lot more collision calculations involved.
If its not any of the above then its starting to get tricky and probably beyond me atleast without further information.