[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use vtable for eww-bookmarks
From: |
Sebastián Monía |
Subject: |
Re: [PATCH] Use vtable for eww-bookmarks |
Date: |
Thu, 12 Dec 2024 14:37:23 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Adam Porter <adam@alphapapa.net> writes:
> About regenerating the elements and not being able to use EQ: is that
> because the original bookmark objects are not being used as-is?
Correct.
> If so, could we address that?
We could add the order in the file format. Or number the items when we
read them. Then use the object including the number to track it all.
But when change the "order" number associated with a row, then it won't
be eq/equal anymore, anyway.
Maybe better: vtable provides a mechanism to have a printer function
called on each row. Then the objects stay the same, in the `eq' sense,
and we can keep the counter for order outside the row, as part of the
printer/"formatter" (in vtable parlance).
To consider: then we would call a function for each printed row vs
calling it once to generate the list in one go. Plus the code to update
the items order number when removing and inserting each one.
Of course the real answer on which one is "faster" or "leaner" needs a
benchmark. For 90% of cases the amount of bookmarks won't be more than a
couple dozen, so I don't think it will matter.
I would leave it as-is on the grounds of (add less code + the
speed/memory difference is small)(1). But as usual, if there's
consensus that we rather do the outlined above instead, I'll do it.
(1) like I said, no benchmark, so "_I assume_ the difference is small"
> On Thu, Dec 12, 2024, 09:25 Sebastián Monía <sebastian@sebasmonia.com> wrote:
>
> Sebastián Monía <sebastian@sebasmonia.com> writes:
>
> > Sebastián Monía <sebastian@sebasmonia.com> writes:
> > Hi all,
> > Attached a patch with "Order" and validation for this sort before
> > kill/yank.
> > As always, open to feedback.
>
> Updated the patch to include the changelog :)
>
> --
> Sebastián Monía
> https://site.sebasmonia.com/
>
--
Sebastián Monía
https://site.sebasmonia.com/
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Adam Porter, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/08
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/10
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/11
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/12
- Re: [PATCH] Use vtable for eww-bookmarks, Adam Porter, 2024/12/12
- Re: [PATCH] Use vtable for eww-bookmarks,
Sebastián Monía <=
- Re: [PATCH] Use vtable for eww-bookmarks, Eli Zaretskii, 2024/12/28
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/30
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/31
- Re: [PATCH] Use vtable for eww-bookmarks, Adam Porter, 2024/12/31
- RE: [External] : Re: [PATCH] Use vtable for eww-bookmarks, Drew Adams, 2024/12/31