WebKit Bugzilla
Attachment 346592 Details for
Bug 187455
: Make WebCore::Timer more space-efficient
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187455-20180804113244.patch (text/plain), 2.16 KB, created by
Simon Fraser (smfr)
on 2018-08-04 11:32:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-08-04 11:32:44 PDT
Size:
2.16 KB
patch
obsolete
>Subversion Revision: 234579 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4524d4219dfbaa17eba770c08dd7b333e47dbe8c..e6ca75bc0cec858eb76437c5684d2795cd517ef1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-08-04 Simon Fraser <simon.fraser@apple.com> >+ >+ Make WebCore::Timer more space-efficient >+ https://bugs.webkit.org/show_bug.cgi?id=187455 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Steal a bit from m_heapIndex for m_wasDeleted to eliminate padding in Timer. >+ This reduces the size of Document, which has 8 Timers, from 3360 to 3296 bytes (saving 64 bytes). >+ >+ * platform/Timer.cpp: >+ (WebCore::TimerBase::TimerBase): >+ * platform/Timer.h: >+ > 2018-08-04 Ryosuke Niwa <rniwa@webkit.org> > > Properties set on window.customElements can disappear due to GC >diff --git a/Source/WebCore/platform/Timer.cpp b/Source/WebCore/platform/Timer.cpp >index 5706c2e8eb6a845cb8bcd7a4762a9c5448fdfb93..722d4539fe1f268fedeba610050d70813ebf5bf2 100644 >--- a/Source/WebCore/platform/Timer.cpp >+++ b/Source/WebCore/platform/Timer.cpp >@@ -185,6 +185,8 @@ inline bool TimerHeapLessThanFunction::operator()(const TimerBase* a, const Time > // ---------------- > > TimerBase::TimerBase() >+ : m_heapIndex(-1) >+ , m_wasDeleted(false) > { > } > >diff --git a/Source/WebCore/platform/Timer.h b/Source/WebCore/platform/Timer.h >index 524d4861f2b48d30457bbf037fb5541499f50772..ec90b861d92a2883b9afa08690f606ad8e4201df 100644 >--- a/Source/WebCore/platform/Timer.h >+++ b/Source/WebCore/platform/Timer.h >@@ -98,9 +98,9 @@ private: > MonotonicTime m_nextFireTime; // 0 if inactive > MonotonicTime m_unalignedNextFireTime; // m_nextFireTime not considering alignment interval > Seconds m_repeatInterval; // 0 if not repeating >- int m_heapIndex { -1 }; // -1 if not in heap >+ signed int m_heapIndex : 31; // -1 if not in heap >+ bool m_wasDeleted : 1; > unsigned m_heapInsertionOrder; // Used to keep order among equal-fire-time timers >- bool m_wasDeleted { false }; > Vector<TimerBase*>* m_cachedThreadGlobalTimerHeap { nullptr }; > > Ref<Thread> m_thread { Thread::current() };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187455
: 346592