Skip to content
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

[READWISE] RxDB patch #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[READWISE] RxDB patch #17

wants to merge 1 commit into from

Conversation

eliias
Copy link

@eliias eliias commented Apr 2, 2024

This PR contains:

Describe the problem you have without this PR

Todos

  • Tests
  • Documentation
  • Typings
  • Changelog

@eliias eliias force-pushed the hannes/readwise-2 branch 14 times, most recently from deb0fcd to c2e2bd1 Compare April 3, 2024 14:50
@eliias eliias changed the base branch from master to readwise April 3, 2024 14:52
@eliias eliias changed the base branch from readwise to master April 3, 2024 14:52
@eliias eliias force-pushed the hannes/readwise-2 branch 7 times, most recently from 401323e to 368a98c Compare April 3, 2024 16:12
@eliias eliias force-pushed the hannes/readwise-2 branch 2 times, most recently from 41b95b3 to a7b0237 Compare June 13, 2024 11:54
@@ -27,6 +32,12 @@ export declare class RxQueryBase<RxDocType, RxQueryResult, OrmMethods = {}, Reac
_latestChangeEvent: -1 | number;
_lastExecStart: number;
_lastExecEnd: number;
_limitBufferSize: number | null;
_limitBufferResults: RxDocumentData<RxDocType>[] | null;
_persistentQueryCacheResult?: string[] | string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i hope this stuff wasn't a hassle to carry over lol. given we don't use it rn

@@ -112,6 +125,48 @@ export function getQueryParams<RxDocType>(
);
}

// This catches a specific case where we have a limit query (of say LIMIT items), and then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooc have you tested to confirm the limit buffer stuff works? i guess we have tests for it

Copy link
Author

@eliias eliias Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test anything tbh. I just rebased everything we had into a single commit and then resolved the merge conflicts. I think this comment is from last year :-).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya it is. just seeing the limit buffer code reminded me that we need to make sure that still works. it's all my custom code to make rxdb faster

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can test more, there was nothing obvious that broke so far though and the code is/was pretty similar still in rx-query (and therefore I somewhat assume event-reduce to behave similar).

@TristanH
Copy link
Member

should this PR be into the readwise branch instead of master?

@eliias
Copy link
Author

eliias commented Jun 20, 2024

should this PR be into the readwise branch instead of master?

@TristanH yeah I was wondering how you wanna deal with this rxdb15 upgrade. should we do readwise15 or we comfy with just reusing readwise?

@TristanH
Copy link
Member

@eliias im fine with just updating readwise. we reference a commit hash in our package.json anyways: 53f893b

i guess the problem with reviewing the PR that was is that all the rxdb code updates would show in that PR?

@eliias eliias changed the base branch from master to readwise June 20, 2024 16:19
@eliias eliias changed the base branch from readwise to master June 20, 2024 16:19
@eliias
Copy link
Author

eliias commented Jun 20, 2024

@eliias im fine with just updating readwise. we reference a commit hash in our package.json anyways: 53f893b

i guess the problem with reviewing the PR that was is that all the rxdb code updates would show in that PR?

Yep, this PR includes all our changes against master, it was impossible to rebase all our commits against 1000+ rxdb commits (impossible = infinitely more work).

@TristanH
Copy link
Member

hmm ok, well i guess i worry about merging into readwise then as we could lose the old commit that master points at right now?

we could rename the old branch to readwise_2023?

@TristanH
Copy link
Member

back to the original (separate) question, i wish i had a way to review the actual changes, but i see why that's probably not doable here... will just cross reference with our old code

@TristanH
Copy link
Member

ok @eliias reviewed it mostly, is there anywhere (i assume rx-query.ts) i should really look relevant to your changes?

@eliias
Copy link
Author

eliias commented Jun 21, 2024

ok @eliias reviewed it mostly, is there anywhere (i assume rx-query.ts) i should really look relevant to your changes?

There are no real changes tbh, this was a rebase exercise. I don't know how to improve the review experience beyond what we have here, but I was hoping you remember your changes and I remember mine, and if we agree it does the same as before, we are good to ship.

@eliias eliias force-pushed the hannes/readwise-2 branch 2 times, most recently from 610d410 to c2f3dc8 Compare July 9, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants