Glad we solved glitchy scrolling for now (the title of this blog post was “on rendering diffs”, not “searching diffs”). Browser search on a 36 million line diff would not by great, but it’s something we hope to have a solution for. One step at a time.
HN user
amadeus
Would love to see a website that makes everything DiffsHub does without making any of the work necessary. Making it all obsolete would be a huge step forward for the web. We support diffs that exceed 36 million lines, with syntax highlighting, comments, bundled into a reusable library for anyone to use.
Also this works in all browsers, fixing blink doesn’t help move the web forward.
Appreciate it, thank you!
Hey thank you, appreciate your kind words! I don’t write much and was quite an effort to get all this written out!
I probably didn’t explain this well enough, but your render times always have to be within the frame buffer (16.6ms for 60hz or 8.3ms for 120hz). Under normal circumstances even if you occasionally blow a frame buffer, with the over-scroll you won’t hit the sticky bounds.
The only time you will is if you’re scrolling at a rate where the jumps are quite large — large and fast enough typically where you’re not going to have a frame of reference for what you should see vs what you are seeing to notice you are behind.
Ultimately scrolling is managed on a separate thread from JS, which means if you do like an opt+click on the scroll bar, you’re going to make a jump that JavaScript can never keep up with, even if you’re under your frame times.
And with regards to safari, if your requestAnimationFrame is capped at 60hz but your scrolling is GPU composited at 120hz, this is the only way to keep scrolling at 120hz with 60hz dom updates and never see any blanking.
Yeah, my bad. Sorry i wasted your time :(
Yup! You can pick from a bunch of different themes and use css variables to override the core colors as well!
Maybe i need to buy one of these devices to test.
Just to be clear tho, we don't actually scroll jack, native scrolling works as it should and content should move with normal gpu composited scroll. That said, it's possible that loading that much data into memory may be causing causing knock on effects somehow that are just slowing everything down.
disagree with the theory that scrolling frame rate doesn't need to be smooth for scrolling to feel smooth
It's possible you might be misunderstanding what I was trying to say here because 120hz scrolling on a 120hz device was the goal and why one of those virtualization techniques was not acceptable to me which lead me to coming up with a novel workaround to this problem (Inverse Sticky Technique).
CodeView uses a system that allows scrolling to update at your native framerate (120hz) WITHOUT needing Javascript needing to keep up at 120hz. If you're seeing stuttering while scrolling on https://diffshub.com would love to know more context (device/diff link/etc) because that is very much NOT our experience.
Naw, the truth is I'm not really smart or intelligent enough to build a semantic diff system. For that you'll need to wait on a post from one of our smarter devs, this was a post about rendering diffs in a browser.
Yes and no. It would help to improve things a bit when it comes the measure/reconciliation phase (unclear to say how much). However we've already done a pretty good job around batching writes vs reads.
However passing a million lines of code through pretext is unlikely to be very efficient, so a lot of the work around estimation is still very important.
That said, while I don't want to make pretext a direct dependency of the library, there's a good chance I'll explore the possibility of allowing devs to pass it in as an additional argument perhaps improve performance a bit.
It should also be noted that we have a full API to support things like line annotations (comments, etc) that are entirely controlled by the user, so there's always a bit of a dynamic aspect there that would come into play
thank you!
Performance and optimization is one of many pieces, but yes, it's a meme to render 500k lines.
That said though, and maybe I didn't say it well in the post, the more performant and optimized your tool is, the less burden you put on developers and users.
Sure you won't review 100k lines, but maybe the diff includes a ton of testing snapshots, or maybe it's a long running feature branch and you need to just quickly jump in and look at a specific change from a specific file. The less the developer or the user needs to think about `how` to render the diff or `how to navigate the diff`, the better we did our job.
One of our next big projects is actually to support semantic diffs, which I think will be a lot more applicable to what you're asking for here. Currently diffs just takes a normal git patch file, or generates one from 2 versions of a file.
A bit of a technical deep dive into how we built CodeView, a review surface that can handle rendering diffs of immense size, all in a browser.
Disclosure: I'm a Discord developer.
Discord works in a browser or with the native apps. Just visit the website and click 'Open Discord in your browser'
Yet another Vim bashing post by the Floobits bros.
It's getting old.
They addressed this in the article.
Well, you're just wrong, simple as that. If you can't see the difference, I suggest you try educating yourself.
I'm not going to waste my time with your factually incorrect pedantry.
Anecdotally, I've only heard a lot of people complain. Comparing this to a witch hunt appears pretty absurd. Nobody is physically attacking him for what he believes.
Free speech is a 2 way street. I can disagree with him and express that, just as he can express his own views. Free speech is not expressing an opinion with everyone else shutting up about it. Why is this so hard to understand?
Edit: The more I read your comments, the more ridiculous you sound. People protest and boycott things all the time. Why is this any different? If he can't handle public outcry to his own actions, well, that's his problem, not mine.
You're still stretching the point.
If you have an issue with the term marriage, then you're coming at it from a religious perspective. There's separation of church and state, it's a constitutional thing.
If you want to redefine something as a Civil Union, then you help create and vote for that specific legislation. There was/is no logical or rational reason to vote for Prop 8.
Sorry, you're just wrong. There is no language in prop 8 that has to do with the concept of civil unions. All it DID do was define marriage as being between a man and a woman.
Any debate about marriage and a government's role in it is sidestepping the issue. It's a civil rights issue, and he chose to put money in an attempt to create discrimination for a certain kind of people.
There's no excuse, he doesn't deserve death threats, but he deserves everyone talking about it and making it a big deal.
These arguments are not inline with the real problem I have with Brendan Eich.
He ACTIVELY contributed to a political campaign who's goal was discriminate against a particular group of people. This is a civil rights issue, it has nothing to do with politics, or beliefs.
There are political issues, then there are civil rights issues.
My understanding is that Vimproc can only kick off async processes, it can't actually call back into the main Vim thread once a process has completed.
It should be noted that ImageAlpha, the app under the pgnmini.com url, provides a GUI to to PNGQuant and PNGNQ.
While a command line tool is useful by itself, using lossy compression is best done in a GUI to determine how much compression draws the right balance between file size and its loss in quality. ImageAlpha is amazing for this.
How does anyone consider this sane javascript? Is this what the community has been reduced too?
I'm surprised file size hasn't been mentioned as a mother major reason.
With tools like ImageOptim, and ImageAlpha, you can make PNGs INSANELY small with 0 or an imperceptible loss in quality.
For example, PNGs do insanely well when you have few numbers of colors that are repeating often. I've had had images that were 640px by 960px (pixel style art) that compressed down to sub 3kb with no quality loss. Good luck getting that with an SVG.
(Yes, there are certain types of images that PNGs are a terrible solution for, however, really, what I mean here is, right tool for the job.)
Wait what?
A high end Aprilia costs around 20k (this is an expensive superbike, see one from the Japanese manufactures for something half the price)
http://www.apriliausa.com/en-US/Model/101340/RSV4+Factory+AP...
This electric bike starting at 30k is very expensive relatively speaking.
Spoken by someone who truly has never ridden a motorcycle before.
I went crazy, and it's a bit more tricky to pull off, but `q` is my leader key. Haven't looked back.
P.S. I mapped `Q` to recording Macros, since the default use of `Q` is completely useless to me.