question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: suggest a common utility to "rule them all"

See original GitHub issue

AS I’ve found myself copying and pasting a similar domc scope utility all over, I wonder if we could simply normalize all tests (which is also an opportunity to call for updates, so that those that won’t be updated can be discarded) through an utility that can easily handle all cases, including returning {...scope} whenever it’s needed to trigger updates (i.e. neverland, or react-hooks).

For this purpose, I’ve created the js-framework-benchmark-utils module, which, accordingly with the discussion and the outcome we’ll have in this ticket (if any), could be used already for all my libraries.

This should make any benchmark scope/state handling at pair, in terms of performance, so that nobody can cheat or do things wrong, simplifying both maintenance of every library/framework in this repository, but also helping in making future pull requests easier to review.

Happy to hear your opinion 👋

P.S. if it’s OK to use such module, I could update all my PRs with it, so that you won’t need to re-run tests after. Please let me know, thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:23 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
krausestcommented, Nov 29, 2019

@WebReflection I’m absolutely fine with the common utility module (but I don’t think I’ll enforce its usage for all js frameworks).

1reaction
WebReflectioncommented, Nov 30, 2019

@krausest just FYI all my 5 PRs are ready to land. I’ve used js-framework-benchmark-utils in all of them, and also described a particular case with hooks and state, handled via neverland but working anyway.

It’s worth saying that my last days of investigation with this benchmark brought under my attention a variety of issues, most noticeable the cost of WeakMap, which I have previously used without thinking too much, as I couldn’t expect such big slowdown when these contains many weak references as key.

This means that I have to work to optimize as much as possible augmentor, as if there’s any chance to avoid using a WeakMap in useState, I’ll go for it, as the selectRow tests shows these are the bottleneck for both neverland and heresy.

That being said, I am overly satisfied about current state of my libraries, especially 'cause I’ve found out that hyperHTML test case was using performance.now() all over the place, it wasn’t minized properly, and there was a lot of wrong things with it, so that now it seems like it’s faster than lit or lighter html in the keyed result 😅

TL;DR please do merge those PRs whenever you have time, but I hope in a month (busy time ahead) I can just bump neverland and heresy versions to see way better results not ruined by the selectRow score.

Thanks again for patience, hints, and for welcoming the 3rd parts utils library proposal 👋

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write a Research Proposal: Structure, Examples ...
First, it shows and justifies the need to investigate a research problem and, second, it presents a set of workable strategies for conducting ......
Read more >
Section 2. Developing a Proposal for Change
Learn what a proposal for change means; why, by whom, and when such a proposal might be developed; and how to go about...
Read more >
WRITING A SUCCESSFUL PROPOSAL
General operating proposal​​ Often you are asking for money not just for a specific project but to support all your activities for one...
Read more >
A Guide to Proposal Planning and Writing
Indicate where you got their names and raise questions that will assist you in learning about the funding source. Questioning is the foundation...
Read more >
Specific Aims In the template below, I use examples from a ...
Instructions: The goal of this template is to help you focus your aims, one vital component of writing a successful proposal. This template...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found