See this video by @unknown for a demonstration of this issue.
Description
Redstone lamps turning on and off cause an unusually large amount of FPS lag when on/near chunk borders. While there is still some (expected) lag in the middle of a chunk, the amount on chunk borders is significantly higher.
Reproduction
Enable chunk border rendering with F3+G
Enable the lagometer and debug profiler by pressing Alt+Shift+F3.
In the middle of a chunk, build an 6x6 pad of redstone lamps, and place redstone dust on those lamps.
Connect those lamps to a fast clock (such as 2 repeaters pointing into each other)
Observe that there is a slight lag spike each time the lamps turn on.
Disconnect that system, and then build a similar 6x6 pad at the intersection of 4 chunk borders (such that there is a 3x3 area in each chunk)
Connect that system to a fast clock
Observe the much higher FPS drop
Notes
The profiler node "scheduledExcecutables.checkLight.checkedPosition < toCheckCount" is the most time-consuming one when this issue is in effect.
Related issues
is duplicated by
Attachments
Comments

The lag happens only when it is deactivated, just make a line with lamps and a lever, flip lever on: pretty expected, all turn on. flip lever off: crazy lag spike and huge delay
Very true, and a much simpler test than my original build. I have added a screenshot of an automated setup for reference.
The issue persists in 13w10b, tagged accordingly.
I can more than confirm this. I built a pretty big light machine and it works great, but most things I try to do with it can't go smoothly live thanks to this bug alone. One part of it turns on in 1 second but takes about 5 turning off.
But it's already noticeable from 9 redstone lamps on. This should be fixed urgently!
In 1.5.1 lamps alone (like in reporter's setup) are not affected by this issue. Contraptions with lamps powered off repeater clocks and/or through sets of repeaters are affected though, as are repeater/comparator oscilliscopes or light-emitting devices of similar complexity. Moreover, such contraptions can induce a lagging that is even more severe when player stands exactly 10 chunks away from said contraptions.
I cannot reproduce in 1.5.1 - I have a lighthouse with a blinking lamp (in fact, 8 lamps). No lag between if it is on or off (I have a switch to turn off the lamps)

Is this still a concern in the current Minecraft version 1.6.4 / Launcher version 1.2.5 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Not really as bad as it was back then in 1.4, but still noticeable in 13w39a. I experience like -20 fps and laggy rendering when I turn on the clock similar to the setup on the second screenshot.
this has been a bug for so long, can somebody at least create a fix for now? would be much appreciated
I am having this issue in 1.7.2. Short-term severe lag, only when the lamp array is turned off.

Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Can confirm this issue in 14w07a.
Lighting is still a bit laggy in 14w33a.
I can confirm this in 1.8-pre2.

Could be related to MC-11571.
Possible, but this type of lag seems to be localized to lamps. Other small scale lighting updates, like breaking glowstone, don't make this happen.
This ticket is still valid for 1.8.1 pre4.
'Lamps' in last Isaac's statement and, probably, in description should be changed to 'redstone components', most of which have had their lighting disabled some time ago for the very reason this ticket exists. As for lamps, lighting is their essential function and obviously could not be disabled. I suppose when this gets fixed, wires and comparators should again become able to emit light as well.
Yeah, I hope so. I really liked that.
Confirmed for 1.9-pre1
Confirmed for 1.9.2.
Hopefully this isn't redundant information but I wanted to add some clarification from my own findings:
This issue affects any redstone circuit that is powered on/off by a switch or redstone clock and does not apply to just redstone lamps (for example: a simple pulsing circuit to dispense "garbage" into lava using two repeaters on 4 ticks each still lags).
As the OP claims, this applies ONLY to circuits being powered OFF.
This applies to both singleplayer AND multiplayer servers (Vanilla and Spigot alike).
Java versions as early as v1.8.0_25 and as recent as v1.8.0_77 are affected.
This DOES produce a momentary frame spike, dropping as low as 30fps from 120fps.
I hope this affords a bit more useful information and look forward to a fix.

Might this be MC-81098? Redstone dust is used in the setup mentioned in the description and it causes lag.
I have the same problem with 1.10.2.
30 pistons de-/activated by redsone: no lag
30 redstone lamps de-/activated by redstone: lag
15 redstone lamp pairs de-/activated by redstone: bigger lag
The lag caused by deactivating is quite bigger than by activating.
I investigated a bit on this bug.
It seems to correlate with the debug Node "scheduledExcecutables.checkLight.checkedPosition < toCheckCount", which takes up >50% of the entire frame time when the contraption goes over a chunk border.
A Example of this can be found here: https://www.youtube.com/watch?v=af9Cgck1zGA
2x the same setup, once within one chunk, once on a chunk border.
Can confirm for 1.12.1.
Can confirm for all 1.13 snapshots.

Did you really try all of them? Even the ones that aren't available in the launcher anymore?
Actually, it doesn't matter, all versions are already marked as affected.
I've experienced it on every snapshot, yes.