Skip to content

SCXodeMiniMap makes Xcode slower #80

Open

Description

@Bluelich

The plugin list that used by me is below:
{
Alcatraz
ColorSenseRainbow
DBSmartPanels
DerivedData Exterminator
DXXcodeConsoleUnicodePlugin
FuzzyAutocomplete
HOStringSense
JSFormatter
Lin
MCLog
OMQuickHelp
Peckham
RTImageAssets
SCXcodeEditorInset
SCXcodeMinimap
VVDocumenter-Xcode
XAlign
}
When I remove SCXodeMiniMap, Xcode works well.

The version of my mac is 10.11.3, and my Xcode is version of 7.2(7C68).

Activity

  1. stefanceriu commented on Mar 22, 2016

    @stefanceriu
    Owner

    I does indeed make Xcode slower, mainly because of the larger amount of text that it now needs to syntax highlight, but, unfortunately, I haven't found any suitable solution to improve the performance and I had to settle on delaying when the text is invalidated.
    If you have any ideas pull requests are more than welcome.

  2. dzenbot commented on Mar 23, 2016

    @dzenbot

    What if we MiniMap didn't do any syntax highlight? That could help a lot, isn't it?

  3. stefanceriu commented on Mar 23, 2016

    @stefanceriu
    Owner

    Absolutely. You can give it a try by replacing the the layoutManager's shouldUseTemporaryAttributes delegate method with something along these lines:

    - (NSDictionary *)layoutManager:(NSLayoutManager *)layoutManager
       shouldUseTemporaryAttributes:(NSDictionary *)attrs
                 forDrawingToScreen:(BOOL)toScreen
                   atCharacterIndex:(NSUInteger)charIndex
                     effectiveRange:(NSRangePointer)effectiveRange
    {
        SCXcodeMinimapTheme *theme = ([layoutManager isEqualTo:self.textView.layoutManager] ? self.minimapTheme : self.editorTheme);
        return @{NSForegroundColorAttributeName : theme.sourcePlainTextColor};
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions