Replace suggestions by new ones instead of merging. |
|||||
Issue descriptionCurrently, the provider of remote content suggestions uses a complicated logic to merge suggestions across fetches and to expire them. In order to simplify things and let the server always decide, we should implement the following: - new (non-empty) list of suggestions for a category always replaces the previous content of the category, - we never expire current suggestions, only dismissed suggestions are removed after expiry date (we do not need a timer, this can happen before we use dismissed suggestions for filtering newly fetched suggestions), - we keep an archive of older suggestions in memory to support previously opened NTPs (these are never stored to DB and thus cleared upon restart; we trim the list after 200 suggestions to address users that never close Chrome), - upon start, we clear orphaned thumbnails in the DB (for which there is no suggestion in the DB).
,
Sep 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/928ed3fef6431a8815e32bb2d905fc3bd21f5024 commit 928ed3fef6431a8815e32bb2d905fc3bd21f5024 Author: jkrcal <jkrcal@chromium.org> Date: Fri Sep 23 18:47:06 2016 New snippets now replace old snippets and do not merge Previously, the provider of remote content suggestions used a complicated logic to merge suggestions across fetches and to expire them. After this CL, - new (non-empty) list of suggestions for a category always replaces the previous content of the category, - we never expire current suggestions, only dismissed suggestions are removed after expiry date (we do not need a timer, this can happen before we use dismissed suggestions for filtering newly fetched suggestions), - we keep an archive of older suggestions in memory to support previously opened NTPs (these are never stored to DB and thus cleared upon restart; we trim the list after 200 suggestions to address users that never close Chrome). This CL does not deal with clearing orphaned suggestion thumbnails from the DB which is necessary for the current design. This is left for a follow-up CL. As additional technical steps: - The suggestions->category map was removed from the ContentSuggestionService. This blocked image fetching queries for archived suggestions to get to the provider (as the service does not know about the archive). We now rely on the category being encoded into the suggestion_id string. To this end the CL moved the functions that build and parse suggestion_id strings into CategoryFactory to be accessible both from the service and the providers. BUG= 649009 Review-Url: https://codereview.chromium.org/2355393002 Cr-Commit-Position: refs/heads/master@{#420677} [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/category_factory.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/category_factory.h [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/content_suggestions_provider.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/content_suggestions_service.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/content_suggestions_service.h [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/content_suggestions_service_unittest.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_database.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_database.h [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_database_unittest.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_service.cc [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_service.h [modify] https://crrev.com/928ed3fef6431a8815e32bb2d905fc3bd21f5024/components/ntp_snippets/ntp_snippets_service_unittest.cc
,
Sep 30 2016
,
Oct 4 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/108e9c223a70d6dc4604354ab5afb0b42b28d30f commit 108e9c223a70d6dc4604354ab5afb0b42b28d30f Author: tschumann <tschumann@chromium.org> Date: Tue Oct 04 13:34:57 2016 Extended the ProtoDatabase to provide LoadKeys() functionality. Before this change, the only way to scan all keys was to call LoadEntries() which loads the whole database. In our use case, this means copying a lot of image data which is wasteful. With LoadKeys(), we still need to iterate the whole database but we don't have to copy out (and parse) the values -- just the keys. LoadKeys() is useful when storing relatively large values and only access to the keys is required. We'll use LoadKeys() for NTP content suggestions to garbage collect data. We do that at times when we have a list of all still alive elements and need to intersect that with the elements stored in the db. BUG= 649009 Review-Url: https://codereview.chromium.org/2379113002 Cr-Commit-Position: refs/heads/master@{#422772} [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/leveldb_database.cc [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/leveldb_database.h [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/proto_database.h [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/proto_database_impl.h [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/proto_database_impl_unittest.cc [modify] https://crrev.com/108e9c223a70d6dc4604354ab5afb0b42b28d30f/components/leveldb_proto/testing/fake_db.h
,
Oct 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d475e7d4ed829bd888d8ee18de17de9ef5d8684 commit 0d475e7d4ed829bd888d8ee18de17de9ef5d8684 Author: tschumann <tschumann@chromium.org> Date: Thu Oct 06 14:43:48 2016 NTPSnippetsService: Garbage collect orphaned images at startup. Also extends the unittest to use a proper image_decoder to allow better test coverage (and actually verifying the intended behavior). BUG= 649009 Review-Url: https://codereview.chromium.org/2386103009 Cr-Commit-Position: refs/heads/master@{#423529} [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database.h [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database_unittest.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service.h [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service_unittest.cc
,
Oct 17 2016
,
Oct 17 2016
Issue 642667 has been merged into this issue.
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d475e7d4ed829bd888d8ee18de17de9ef5d8684 commit 0d475e7d4ed829bd888d8ee18de17de9ef5d8684 Author: tschumann <tschumann@chromium.org> Date: Thu Oct 06 14:43:48 2016 NTPSnippetsService: Garbage collect orphaned images at startup. Also extends the unittest to use a proper image_decoder to allow better test coverage (and actually verifying the intended behavior). BUG= 649009 Review-Url: https://codereview.chromium.org/2386103009 Cr-Commit-Position: refs/heads/master@{#423529} [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database.h [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_database_unittest.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service.cc [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service.h [modify] https://crrev.com/0d475e7d4ed829bd888d8ee18de17de9ef5d8684/components/ntp_snippets/remote/ntp_snippets_service_unittest.cc
,
Nov 4 2016
[Automated comment] removing mislabelled merge-merged-2840 |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by fi...@chromium.org
, Sep 22 2016