-
-
Notifications
You must be signed in to change notification settings - Fork 179
[WIP] Faster & Better OldTwitter #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Console log can slow down updating of timelines when scrolling home page - MediaTweets: For added parity (i.e. For my own userscript that listens to webrequests and captures data there)
- Media elements are done
- fix elNew on prop element shenanigans - More work on templated tweetConstructor - Updated twemoji to support unicode 16.x
- TinyDomBuilder now supports class lists. - Remove old template string Quoted functions. - Started converting constructTweet functions - Added missing `lang` to tweetviewer.js
- Moved more code to js safe templates - Move dombuilder code to tdeb.js
Thanks for the interest! I'll have to look into the colors issue and see whether is feasible. It appears to be but I don't want to get people's hopes up too high. Just an edit / update: I've finished the full conversion to templating for the html. I haven't pushed the code for it just yet but it should land real soon. |
I just checked. seems like my PR doesn't contain those commits at all. I'll pull in those changes and uncomment those. |
If you want to return this option you'll have to rename its key to something different so that its reset for everyone and to make it off by default (and make it say that it can make oldtwitter like 5 times slower on some devices) |
Alrighty, sounds good to me. |
- On request from dimden. Default value for link colours is disabled.
Reading into a bit of time & date formatting, it seems that it can get a bit slow when calling toLocaleString. If the browser is old enough, Intl is not available. As such, we fallback to using toLocaleString.
Opening it up for contributions now. I don't want to expand scope too much beyond the main slowdown oldtwitter. It's plenty fast now when zooming timelines (except I think the popup tweet viewer, that seems to be seperate) There's other things that could be further optimized:
Some final timings (without CPU slowdowns, identical profile scroll): Before:
After:
|
Testing through your own OldTwitter build and yeah, everything's working so far, no issues. I can tell the sheer reduced loading speed, nice. |
I think these got caught up in my experiment. It "works" but I don't exactly like how it's handled
Did some digging. This warrants further look into tbh. Seems like when extending Doing a bit more digging, I came across this article. I'll try to implement the fix later when I'm not busy procrastinating away work 🤣 |
@Ristellise Seems that for tweets with more than one uploaded video, it won't do anything if you click on them, play and so. Happens only on (your own) OT build. |
Thanks for bug report. Other than this, @dimdenGD, what else is needed for this to be merged into main? |
Fixed. Seems like a simple mistake of copying and pasting bookmarks classList. Thanks for noticing it! |
Liking main tweets seems to be broken on separate tweet pages (for example https://x.com/notexttospeech/status/1937604725601673467) |
Also code should be formatted back to 4 spaces |
Reformatted to 4 spaces & fixed the missing element. Thanks for the catch. |
Well and last one thing is to fix what's failing the locales test |
I'm not sure what causes this, but some posts randomly get marked as if I bookmarked them, even though I didn't |
Super weird, did it happen previously? |
Reminder to self to create PR fix. This returns an error, even though the tweet seems to be valid. |
This PR is pretty Big (& Experimental!)
As such, I'm opening it early as a draft PR for everyone to see what I've been up to.
In general, this PR's idea is to remove the massive and hard to maintain html string block in favour of building the structure using JavaScript directly. (named "templating" in the below section)
I'm currently not allowing edits by maintainers. Once it's done I'll open up contributions.
This has 2 benefits:
Additionally, I've rolled in a couple new changes:
Potential concerns:
What's done / not done:
What's after this?
Various Odds & Ends & Notes: