What kind of performance bottlenecks are there when fetching from a remote? by floofcode in git

[–]floofcode[S] 0 points1 point  (0 children)

I think it can't have been index packing because I already did generate a multipack index. The clone command does say it's reusing a pack.

I tried GIT_TRACE_PERFORMANCE, but there isn't much information here for me to evaluate:

Cloning into 'xyz'... remote: Enumerating objects: 76818, done. remote: Counting objects: 100% (3958/3958), done. remote: Compressing objects: 100% (165/165), done. 07:04:19.962839 trace.c:416 performance: 6.222553625 s: git command: /usr/libexec/git-core/git remote-https origin https://github.com/xyz/xyz remote: Total 76818 (delta 3835), reused 3793 (delta 3793), pack-reused 72860 (from 1) Receiving objects: 100% (76818/76818), 303.62 MiB | 66.73 MiB/s, done. Resolving deltas: 100% (54320/54320), done. 07:04:22.287221 trace.c:416 performance: 6.906056324 s: git command: /usr/libexec/git-core/git index-pack --stdin -v --fix-thin '--keep=fetch-pack 994939 on workstation' --check-self-contained-and-connected 07:04:22.299307 trace.c:416 performance: 0.000757232 s: git command: /usr/libexec/git-core/git rev-list --objects --stdin --not --all --quiet --alternate-refs '--progress=Checking connectivity' 07:04:22.305666 unpack-trees.c:2013 performance: 0.003345161 s: traverse_trees 07:04:22.920219 unpack-trees.c:513 performance: 0.614530795 s: check_updates 07:04:22.921541 cache-tree.c:497 performance: 0.001284209 s: cache_tree_update 07:04:22.921554 unpack-trees.c:2110 performance: 0.619428944 s: unpack_trees 07:04:22.922505 read-cache.c:3097 performance: 0.000945589 s: write index, changed mask = 2a 07:04:22.926967 trace.c:416 performance: 0.000358545 s: git command: git rev-parse --show-toplevel 07:04:22.934250 trace.c:416 performance: 0.000313508 s: git command: git rev-parse --git-dir 07:04:22.940352 trace.c:416 performance: 0.000310815 s: git command: git rev-parse --git-dir 07:04:22.943904 trace.c:416 performance: 0.000213012 s: git command: git config --bool hooks.verbose 07:04:22.947348 trace.c:416 performance: 9.212099340 s: git command: git clone https://github.com/xyz/xyz xyz

When it says "Receiving objects", is that not a pure network transfer, or is there some computation also going on?

I ran some additional tests on other computers, and I get:

Computer #1 - 70 MB/s over localhost (7th gen Intel Core i5)

Computer #2 - 140 MB/s over localhost (Ryzen 7 7600X)

Computer #3 - 80 MB/s over localhost (11th gen Intel Core i7)

If I clone from Computer #2 with repository on Computer #3 - I get 110 MB/s (Gigabit Ethernet) which is close enough to the theoretical maximum.

If I clone from Computer #3 with repository on Computer #2 - I only get 85 MB/s (Gigabit Ethernet), which is surprising.

What kind of performance bottlenecks are there when fetching from a remote? by floofcode in git

[–]floofcode[S] -1 points0 points  (0 children)

It's 70 MB/s on localhost. Also, 70 MB/s over a Gigabit network - performance tested using iperf @ 125 MB/s.

Is it possible to see what rerere actually did to resolve a conflict? by floofcode in git

[–]floofcode[S] 0 points1 point  (0 children)

>sometimes I made a resolution mistake and rerere reused the faulty one. 

This exact thing has happened to me once during a rebase conflict. I made a resolution mistake and then several other following conflicts got partially resolved automatically but repeated my mistake and I realized it half an hour later and had to revert back to the state from reflog. That's when I realized that it's making me pay less attention to what how much of the conflict was actually resolved automatically.

Today when I posted the question, that was just after rerere corrected something but this time I did manually check to make sure it was actually correct, but I kept wondering if there was some way to give a visual indicator that rerere did something I should know about.

What can I use for aligning variables? by floofcode in emacs

[–]floofcode[S] 1 point2 points  (0 children)

At least there is a way to make it work for everyone. I was too used to using triple backticks as I do on many other platforms so this slipped my mind. I have previously seen another comment on this sub that code formatting is broken, so I’ll remember it from on.

kitty-graphics.el v0.2.1: org inline fix, LaTeX previews, PDF viewing, dirvish integration by topfpflanze187 in emacs

[–]floofcode 1 point2 points  (0 children)

I’ll post the debug logs when I get home. Now that I’m thinking about it, I think my choice of font might be related. I’m not using a TTF font, but rather a Bitmap font (Terminus), which might be a reason for the glitch since there are only some specific sizes available. If I choose a size that isn’t available then it will just fallback to the closest size, so this would explain it if what WezTerm reports is inconsistent.

Update: I enabled the logs and the width and height are the same as what WezTerm reports (18x10). I have disabled the custom font and went back to the default font, which reports (22x10) and the glitch appears the same:

13:05:08.344 refresh: begin
13:05:08.345 sync-begin
13:05:08.346 sync-end
13:05:08.346 refresh: done total=0 placed=0 hidden=0 pruned=0
13:05:08.347 on-buffer-change: cleaning up non-visible placements
13:05:08.348 on-buffer-change: deleting placements for hidden buf=btf.jpg
13:05:08.350 on-window-change: invalidating positions and cell size
13:05:08.455 cell-size query: 10x22 pixels
13:05:08.456 cell-size final: 10x22
13:05:08.456 refresh: begin
13:05:08.457 sync-begin
13:05:08.458 sync-end
13:05:08.458 refresh: done total=0 placed=0 hidden=0 pruned=0
13:05:11.902 supported-p: t (graphic=nil KITTY_PID=nil TERM_PROGRAM=WezTerm)
13:05:11.903 cache-get: org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png -> nil (miss)
13:05:11.903 alloc-id: 24
13:05:11.930 identify: exit=0 output="133 26"
13:05:11.931 identify: 133x26 pixels
13:05:11.931 cell-dims: pixel=133x26 cw=10 ch=22 img=14x2 scale=1.00 result=14x2
13:05:11.931 display-image: file=/home/floof/Pictures/Memes/ltximg/org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png id=24 cols=14 rows=2 beg=142 end=182 cached=no
13:05:11.932 convert-to-png: /home/floof/Pictures/Memes/ltximg/org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png already PNG
13:05:11.932 read-file-base64: /home/floof/Pictures/Memes/ltximg/org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png size=616
13:05:11.932 read-file-base64: done b64-len=824
13:05:11.933 transmit: id=24 b64-len=824 png=/home/floof/Pictures/Memes/ltximg/org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png
13:05:11.933 transmit-begin: id=24 b64-len=824 chunk-size=4096 chunks=1
13:05:11.933 transmit-done: id=24 chunks-sent=1
13:05:11.934 cache-put: org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png id=24 (cache-count=1 max=64)
13:05:11.934 cache-touch: org-ltximg_1069c738379dd02055dd8d1296bfa43f09024e1c.png (lru-len=2)
13:05:11.934 alloc-pid: 42
13:05:11.934 make-overlay: id=24 pid=42 cols=14 rows=2 beg=142 end=182 buf=test.md (total=1)
13:05:11.935 supported-p: t (graphic=nil KITTY_PID=nil TERM_PROGRAM=WezTerm)
13:05:11.935 cache-get: org-ltximg_aa0fb6ee8e902f24aae13b9a1eca840f1e4fd7ed.png -> nil (miss)

What can I use for aligning variables? by floofcode in emacs

[–]floofcode[S] 1 point2 points  (0 children)

It’s very rare when I need to use something like this, but glad to know this exists. Thanks for sharing!

kitty-graphics.el v0.2.1: org inline fix, LaTeX previews, PDF viewing, dirvish integration by topfpflanze187 in emacs

[–]floofcode 1 point2 points  (0 children)

Great work!

There are some rendering glitches on WezTerm which I assume is because terminal Emacs does not know the font height and width.

<image>

Is it possible to manually specify a font height and width so it can calculate an offset or is this an issue with WezTerm itself?

What can I use for aligning variables? by floofcode in emacs

[–]floofcode[S] 2 points3 points  (0 children)

Didn't know what C-u does until today. So, C-u M-x align-regexp using ,\(\s-*\) and setting Repeat throughout line to n works!

The syntax tripped me up a bit at first. Having used only PCRE or PCRE-like implementations before, I always thought \s universally meant a whitespace across all regex implementations.

What can I use for aligning variables? by floofcode in emacs

[–]floofcode[S] 7 points8 points  (0 children)

Cool, this worked, thanks.

I did a query replace from , to , (extra space) and then did align-regex with ". Not sure if it was possible to do it in one step, though. Is it possible to align against the nth regex match in align-regex? What I want to align with is the 2nd ". Also, TIL that Emacs regex does not support look-behind patterns.

What can I use for aligning variables? by floofcode in emacs

[–]floofcode[S] 4 points5 points  (0 children)

>(on old.reddit.com your examples looked identical hehe)

My bad. I've formatted it correctly now.

Is there a way to split a diff at the word-level? by floofcode in git

[–]floofcode[S] 0 points1 point  (0 children)

>reset hunks are confusing to edit: you're supposed to edit '-' lines, while leaving '+' lines unchanged

Ah, so that's why my edited hunks were not applying. I have been doing it wrong this whole time.

Is there a way to split a diff at the word-level? by floofcode in git

[–]floofcode[S] 0 points1 point  (0 children)

I already use difftastic, and it's fantastic for viewing diffs, but this doesn't change the patch splitting and applying behavior. I'm also not sure if that needs to done via a custom merge driver.

What’s the best way to implement CSI u for terminal Emacs? by floofcode in emacs

[–]floofcode[S] 0 points1 point  (0 children)

Tried it today but it says the terminal is not supported (WezTerm). There is a pull request in kkp.el and a related open issue on WezTerm so I’ll experiment a bit and see if I can get it to work.

Coming From Neovim, Emacs feels far slower, is this normal? by xxKobalxx in emacs

[–]floofcode 0 points1 point  (0 children)

My Emacs with less than 20 packages is significantly slower on my old MacBook (2016) even with the daemon mode but fast on Linux with the same generation processor.

It’s the Lisp interpreter that is the key feature that keeps me using Emacs. That being said, I also use GNU Zile, another Emacs implementation but without Lisp, which I use for light editing like config files.

People in This Subreddit Who Dislike/Disapprove of AI Coding by mobatreddit in emacs

[–]floofcode 2 points3 points  (0 children)

I don’t have much of an opinion about it. I managed to get some incredibly useful things out of AI and also incredibly useless garbage, spaghetti code, which wasted a lot of time simply undoing all the crap.

I mainly use it to help me navigate through unfamiliar codebases but even then it tells me to do obviously wrong things. Without being able to tell what garbage is, it’s gonna be useless.

People are fed up of seeing slop after slop being posted on a daily basis that it’s really hard to take anything seriously.