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

Minimise Data sent to client to reduce bandwidth for mobile #84

Closed
nelsonic opened this issue Jun 7, 2016 · 0 comments · Fixed by #85
Closed

Minimise Data sent to client to reduce bandwidth for mobile #84

nelsonic opened this issue Jun 7, 2016 · 0 comments · Fixed by #85

Comments

@nelsonic
Copy link
Contributor

nelsonic commented Jun 7, 2016

At present we are sending the full package (up to 40kb of JSON) back to the client for every packageOffer regardless of what the client needs to display a tile:

Example: https://numo-search-results.s3.amazonaws.com/ci/ffe95600-27d8-11e6-9b2f-133803a346f1/PMISUAX.json

the Package tile only uses a subset of the data:

render-pacakge

Our ideal solution would be to let the Client send the list of desired/required fields in the GraphQL query requesting search results, but that is not the "fastest" solution to the problem...

So, for the immediate future (demo!) we are going to filter

Required Fields

  • type: 'package'
  • id
  • packageOffer.hotel.name
  • packageOffer.hotel.starRating
  • packageOffer.hotel.images.small (only the first image ... we only display one!)
  • packageOffer.price (everything) see: package-tile/index.js#L26
  • packageOffer.hotel.place see: package-tile/index.js#L11
  • packageOffer.flights.outbound (first item only)
  • packageOffer.flights.inbound (first item only)
  • packageOffer.nights
  • packageOffer.provider (for context and analytics)
  • packageOffer.hotel.concept (not currently used, but plan is to include concept label on tile

For complete React component see: isearch-ui/lib/package-tile/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant