Looking for testers for Pigments


#1

Hi folks,

I’ve just released Pigments which is my rework of both atom-color-highlight and project-palette-finder as a single package.

screen

It includes a work on serialization so that the package doesn’t need to scan the whole project on every startup.
It also includes many optimizations so performances when typing in a big stylesheet with a lot of colors should be clearly better (the previous version was destroying/recreating markers every time the user typed something).

Note that if you have the former two packages installed they’ll deactivate themselves if Pigments is activated to avoid having two sets of color markers displayed in the editor.

All features from both packages should be available so you shouldn’t see much differences, except that the palette view is now a bit sexier with some new options to group colors by file and to merge duplicates into a single entry.

It’s an early version so there’s probably some issues here and there, and that’s why I need you.

Know Issues

I’ve noticed that, when restoring the color markers from the serialized state, it can compute the markers position for an editor where all the styles haven’t been applied yet, so markers appears with a bit of offset. I’m trying to see how I can detect when these styles are applied.


#2

I’ll test! Already replaced atom-color-highlight and project-palette-finder with this. :smile:


#3

I am going to replace it now.


#4

I am using it!


#5

Thanks guys!

I’m still looking for a solution for markers update. When typing into the buffer there’s some delay before the markers placed below the cursor get their position updated. If anyone know something to get around that it’ll be great.

Also, the minimap plugin will come soon ;).


#6

Your style for the color find results also changes the appearance of the regular project find results (lines 173 and onwards in the stylesheet). I would say that’s going a bit far outside the scope of the package. Honestly, I also think it’s a bit much and an unnecessary addition: better to let the UI theme take care of that and contribute improvements to a UI theme.


#7

I’m also getting a pretty severe performance hit on every keypress when working on isotope. I guess isotope is pretty big, but it’s by no means huge. I wouldn’t mind if it takes a while for the colors to update, but I’m not willing to trade in any typing performance.


#8

I was getting the same thing. Maybe related to auto complete. Unfortunately, I had to disable pigments for now.


#9

No autocomplete is active on my end, don’t think I’ve got anything else that listens to keypresses.


#10

At start I was just including the styles from find-and-replace because they are loaded only after its activation, so if you run the pigments search before there’s no styles yet. But letting them leak outside my custom element is clearly wrong.


#11

That’s weird, because the main change between atom-color-highlight and pigments was precisely to avoid penalizing typing performance by taking all the parsing in a separated task only triggered on did-stop-changing event, so it shouldn’t just do nothing while you type something.

The other big part is the buffer’s markers range update made by the editor, but that’s also triggered on did-stop-changing hence the offset visible in color marker when you type something above, the buffer marker is updated after the input end and dispatch its did-change event.

That leave us with the autocomplete-plus provider, which operates during typing, but if you doesn’t have autocomplete-plus installed it isn’t activated.

I’ve profiled several time the typing using isotope-ui as project and on my mba the reports seems quite good. Given that I haven’t done any optimization beyond the structural optimizations implied by the rewrite there’s cleary room for improvement.

I’ll be interested if you can provide a profile report so that I can analyze where things goes wrong.

Same as above, a profile report would be great.
And that make me think that I also should provide a more strict autocomplete provider.


#12

Sorry, I don’t know what you mean by profile report.

I can reproduce with autocomplete-plus and autocomplete disabled. But, seems worse with autocomplete-plus enabled. There is a long pause after typing a second character (which activates autocomplete-plus).


#13

In the chrome devtools there’s a Profiles section where you can start recording various metrics:

What I’m interested in is the Javascript CPU Profile (where javascript time is spent).
Press start, play a basic scenario such typing to trigger the autocomplete, then validate, repeat that a few time (more samples == more precision) and finally press stop in the profiler to stop the record. You should get something like that:

Then you can save the recorded profile to share with other people, as chrome allow you to open a profile later for verifications.


#15

The delay in updating the highlights is a bit distracting, they jump and it catches your eye. I would definitely prefer something that puts a coloured marker in the gutter.


#16

There is a problem with rendering at 0.4.1 , the colors are not refreshed and showing up in other lines. i am reporting on github too.


#17

I m still getting problem after the fix , but this time it happens when horizontally scrolled.


#18

Oh right ^^, I only considered vertical scrolling… bitten by my habit of always using soft wrap. I’ll fix that when I get home.


#19

Thats all cool! I just have a keen eye on bugs lol :stuck_out_tongue: