Bug 224166

Summary: Wasted vector capacity in ImageSource
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: NEW    
Severity: Normal CC: sabouhallawa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Simon Fraser (smfr)
Reported 2021-04-03 17:26:54 PDT
ImageSource wastes vector capacity in m_frameCommitQueue. On YouTube.com: Wasted capacity: 11264 bytes (used 0 of 11264 bytes, utilization: 0.00%) - 44 allocations 5 0x11a7f06cd WTF::VectorBuffer<WebCore::ImageSource::ImageFrameRequest, 8ul, WTF::FastMalloc>::VectorBuffer() 6 0x11a7f03f5 WTF::VectorBuffer<WebCore::ImageSource::ImageFrameRequest, 8ul, WTF::FastMalloc>::VectorBuffer() 7 0x11a7f03b5 WTF::Deque<WebCore::ImageSource::ImageFrameRequest, 8ul>::Deque() 8 0x11a7e5155 WTF::Deque<WebCore::ImageSource::ImageFrameRequest, 8ul>::Deque() 9 0x11a7e4f86 WebCore::ImageSource::ImageSource(WebCore::BitmapImage*, WebCore::AlphaOption, WebCore::GammaAndColorProfileOption) 10 0x11a7e5209 WebCore::ImageSource::ImageSource(WebCore::BitmapImage*, WebCore::AlphaOption, WebCore::GammaAndColorProfileOption) 11 0x11a6ea517 WebCore::ImageSource::create(WebCore::BitmapImage*, WebCore::AlphaOption, WebCore::GammaAndColorProfileOption) 12 0x11a6ea406 WebCore::BitmapImage::BitmapImage(WebCore::ImageObserver*) 13 0x11a6ea58d WebCore::BitmapImage::BitmapImage(WebCore::ImageObserver*) 14 0x1183375cb WebCore::BitmapImage::create(WebCore::ImageObserver*) 15 0x11a7d360a WebCore::Image::create(WebCore::ImageObserver&) 16 0x11a2d1146 WebCore::CachedImage::createImage() 17 0x11a2d4c59 WebCore::CachedImage::updateBufferInternal(WebCore::SharedBuffer&) 18 0x11a2d5184 WebCore::CachedImage::updateBuffer(WebCore::SharedBuffer&) 19 0x11a25dfef WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::RefPtr<WebCore::SharedBuffer, WTF::RawPtrTraits<WebCore::SharedBuffer>, WTF::DefaultRefDerefTraits<WebCore::SharedBuffer> >&&, long long, WebCore::DataPayloadType) 20 0x11a25dd41 WebCore::SubresourceLoader::didReceiveData(char const*, unsigned int, long long, WebCore::DataPayloadType) 21 0x1071cceda WebKit::WebResourceLoader::didReceiveData(IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, long long) 22 0x1077d7629 void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, long long), std::__1::tuple<IPC::ArrayReference<unsigned char, 18446744073709551615ul>, long long>, 0ul, 1ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, long long), std::__1::tuple<IPC::ArrayReference<unsigned char, 18446744073709551615ul>, long long>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)
Attachments
Simon Fraser (smfr)
Comment 1 2021-04-03 17:27:39 PDT
There's inline capacity in the Deque<> because of BufferSize=8. Most images don't do async decoding so this is wasteful.
Radar WebKit Bug Importer
Comment 2 2021-04-10 17:27:12 PDT
Note You need to log in before you can comment on or make changes to this bug.