Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

feat(disjunctiveFacetParams): reduce payload size #912

Merged
merged 6 commits into from
Jun 24, 2022

Conversation

Jerska
Copy link
Member

@Jerska Jerska commented Jun 23, 2022

This PR reduces the amount of params sent for each disjunctive facet request.
It also reduces hitsPerPage from 1 to 0, allowing us to remove the attributes* parameters at the same time.

This reduces:

  • the payload sent by a few bytes
  • and the response size by a few extra bytes as the previous implem sent back one objectID per additional request

This PR reduces the amount of params sent for each disjunctive facet request.
It also reduces `hitsPerPage` from `1` to `0`, allowing us to remove the `attributes*` parameters at the same time.
This reduces:
* the payload sent by a few bytes
* and the response size by a few extra bytes as the previous implem sent back one `objectID` per additional request
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 23, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 02d7a9e:

Sandbox Source
javascript-helper-app Configuration
InstantSearch.js Configuration

@Jerska Jerska changed the title feat(dijunctiveFacetParams): reduce payload size feat(disjunctiveFacetParams): reduce payload size Jun 23, 2022
src/requestBuilder.js Outdated Show resolved Hide resolved
src/requestBuilder.js Outdated Show resolved Hide resolved
@Haroenv Haroenv changed the base branch from master to develop June 23, 2022 12:37
@Haroenv
Copy link
Contributor

Haroenv commented Jun 23, 2022

this looks great! I've tried it out in a sandbox here and everything works as expected https://codesandbox.io/s/javascript-helper-app-forked-jyn60w?file=/src/app.js

Could you update the tests too?

@Jerska
Copy link
Member Author

Jerska commented Jun 23, 2022

Yes I'm on it, but I'm currently struggling with the node-sass version not being compatible with node 16 ^^"
Thanks for trying on a sandbox !

@Jerska Jerska requested a review from Haroenv June 23, 2022 13:54
@Haroenv Haroenv requested a review from sarahdayan June 23, 2022 15:21
@sarahdayan
Copy link
Member

We can replace node-sass with dart-sass in another PR since the former is deprecated.

@Haroenv Haroenv merged commit 9518575 into develop Jun 24, 2022
@Haroenv Haroenv deleted the feat/reduce-params-disjunctive branch June 24, 2022 07:33
Haroenv added a commit that referenced this pull request Jun 27, 2022
 * feat(disjunctiveFacetParams): reduce payload size (#912) 9518575
 * feat(types): support algoliasearch v5 (#910) 524272a
dhayab pushed a commit to algolia/instantsearch that referenced this pull request Jul 10, 2023
…rch-helper-js#912)

* feat(dijunctiveFacetParams): reduce payload size

This PR reduces the amount of params sent for each disjunctive facet request.
It also reduces `hitsPerPage` from `1` to `0`, allowing us to remove the `attributes*` parameters at the same time.
This reduces:
* the payload sent by a few bytes
* and the response size by a few extra bytes as the previous implem sent back one `objectID` per additional request

* feat(disjunctiveFacetParams): add responseFields

* Update src/requestBuilder.js

* chore: remove trailing whitespaces

* feat: remove `responseFields`

* feat: update unit tests

Co-authored-by: Haroen Viaene <[email protected]>
dhayab pushed a commit to algolia/instantsearch that referenced this pull request Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants