diff --git a/src/status_im/activity_center/core.cljs b/src/status_im/activity_center/core.cljs index a3ec78a2a2..dbc96f905f 100644 --- a/src/status_im/activity_center/core.cljs +++ b/src/status_im/activity_center/core.cljs @@ -565,7 +565,10 @@ (assoc-in [:activity-center :filter :type] filter-type) (assoc-in [:activity-center :filter :status] filter-status) (assoc-in [:activity-center :notifications filter-type filter-status :loading?] true) - ;; Comment this assoc call and the UI becomes less responsive. + ;; Comment this assoc call and the UI becomes less + ;; responsive. If you use the fake orange rectangles in the + ;; UI you still notice the latency when this line is + ;; commented. This is worrisome news. (assoc-in [:activity-center :notifications filter-type filter-status :data] []) )} cofx' diff --git a/src/status_im/ui/screens/activity_center/views.cljs b/src/status_im/ui/screens/activity_center/views.cljs index 4ffb6de606..448fc724cf 100644 --- a/src/status_im/ui/screens/activity_center/views.cljs +++ b/src/status_im/ui/screens/activity_center/views.cljs @@ -95,16 +95,23 @@ (tap> {:render-notification (datetime/now->iso8601)}) [rn/view {:margin-top (if (= 0 index) 0 4) :padding-horizontal 20} - [activity-pressable notification - [activity-logs/activity-log - (merge {:context (activity-context notification) - :icon (activity-icon notification) - :message (activity-message notification) - :status (activity-status notification) - :timestamp (datetime/timestamp->relative (:timestamp notification)) - :title (activity-title notification) - :unread? (not (:read notification))} - (activity-buttons notification))]]]) + ;; Use this fake notification rectangle to see a massive rendering + ;; performance difference. + (if true + [rn/view {:style {:width 100 + :height 100 + :background-color :orange + :padding-vertical 10}}] + [activity-pressable notification + [activity-logs/activity-log + (merge {:context (activity-context notification) + :icon (activity-icon notification) + :message (activity-message notification) + :status (activity-status notification) + :timestamp (datetime/timestamp->relative (:timestamp notification)) + :title (activity-title notification) + :unread? (not (:read notification))} + (activity-buttons notification))]])]) (defn filter-selector-read-toggle []