R.swift icon indicating copy to clipboard operation
R.swift copied to clipboard

R.Swift grinds Xcode to a hault when file is selected

Open philosopherdog opened this issue 4 years ago • 6 comments

We're using R.Swift for localized strings. When I select the file Xcode beach balls and becomes unresponsive for like 5 minutes. I need to solve this issue.

philosopherdog avatar Oct 06 '21 18:10 philosopherdog

Incidently the file is 28_000+ lines.

philosopherdog avatar Oct 06 '21 18:10 philosopherdog

I'm running in to the same issue ever since upgrading to the 2021 MBP with M1 chip

ndemie avatar Dec 17 '21 10:12 ndemie

Not sure if this can be "solved" by code. I mean, yeah reducing the number of lines would help, but if you have a lot of translations, then it's impossible to reduce the size of the file. My generated file is "only" 718Ko, 13'000+ lines and it's already slowing/freezing Xcode during at least a minute...

nashfive avatar Jan 25 '22 13:01 nashfive

Hmm. Actually I'm noticing with Xcode 13.2.1 I can select the file again without any issues. I'm on an M1 Max.

philosopherdog avatar Jan 27 '22 23:01 philosopherdog

I'm working on a project where the generated file is 36k+ lines long. It is creating rather serious usability problems. On an M1 Max it takes 45 seconds for quick open to stop beach balling on R.generated.swift.

One minor improvement would be to split the substructures into different generated files, e.g. R.segue, R.storyboard, R.color, etc. This would still leave us with a 30k R.strings.generated.swift (or whatever the naming convention would be), but it would at least make visiting the other types less of a disaster.

Another step might to split the strings up into multiple files, but I'm not sure.

gwk avatar Feb 20 '22 18:02 gwk

I'm agree with @gwk about splitting the files. Maybe as a boolean option false by default

nicolasvergoz avatar Feb 23 '22 14:02 nicolasvergoz