Demonstrate latency even with fake rectangles instead of notifications
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user