Closed Bug 1171903 Opened 9 years ago Closed 8 years ago

LocalStorage inspector does not show all key-value pairs

Categories

(DevTools :: Storage Inspector, defect, P2)

defect

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: eelco, Assigned: ntim)

References

()

Details

(Whiteboard: [polish-backlog])

Attachments

(3 files, 8 obsolete files)

The localStorage inspector only shows a limited number of key-value pairs.

Expected behavior is to show all key-value pairs in a scrollable list.
What page are you testing with?
Flags: needinfo?(ev548)
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #1)
> What page are you testing with?

A web app that I wrote. It stores its internal state in localStorage. There is a publicly accessible installation at
  https://wwwhome.ewi.utwente.nl/~vriezekolke/Raster/RasterTool/public_group/
Initially there are few key/value pairs. If you drag a few objects from the templates at the top onto the workspace, the number of pairs increase quickly.
Flags: needinfo?(ev548)
The storage tool was heavily reworked in bug 1049888 (Firefox 41) to support e10s.

I believe the issue you are reported is fixed by that work.  However, there is a later, additional issue that prevents the tool from working well in e10s mode (bug 1181100).

So, let's re-test this once bug 1181100 is resolved.

Alternatively, you could try your site in Firefox 41 or later, but with e10s off.
Depends on: 1181100
Tried Firefox 41 (the Developer edition), but with identical & incorrect results.
I now prepared a minimal test case at 
  http://wwwhome.ewi.utwente.nl/~vriezekolke/test.html.
This test case creates 200 localStorage items, but the storage inspector shows only 50.
Okay, I can confirm the issue is still present in 42 even after bug 1181100 was fixed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [polish-backlog]
The actor protocol supports a start index and each query is defaulted to return at max 50 items, unless asked otherwise.

Thus this is only a UI limitation i.e. there exists no UI to request next set of items. Alternatively, there is no UI to get X number of items from the actor.
I'm gonna give a try at implementing endless scrolling.
Assignee: nobody → ntim.bugs
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
Tested with localStorage.

Let me know if you're OK with the code so I can start writing tests.
Attachment #8646975 - Flags: review?(mratcliffe)
Attached patch Patch (obsolete) — Splinter Review
Attachment #8646975 - Attachment is obsolete: true
Attachment #8646975 - Flags: review?(mratcliffe)
Attachment #8646976 - Flags: review?(mratcliffe)
Attached patch Patch (obsolete) — Splinter Review
Attachment #8646976 - Attachment is obsolete: true
Attachment #8646976 - Flags: review?(mratcliffe)
Attachment #8647385 - Flags: review?(mratcliffe)
Depends on: 1194190
Blocks: 1194190
No longer depends on: 1194190
Comment on attachment 8647385 [details] [diff] [review]
Patch

Review of attachment 8647385 [details] [diff] [review]:
-----------------------------------------------------------------

I very much like this, awesome job!
Attachment #8647385 - Flags: review?(mratcliffe) → review+
Don't we need a UI to tell the user that this behavior is even possible?
(In reply to Girish Sharma [:Optimizer] from comment #12)
> Don't we need a UI to tell the user that this behavior is even possible?

Scrolling seems like a natural behaviour to me. When the user scrolls down, he/she expects to see more items.
Attached patch Patch v1.1 (rebased) (obsolete) — Splinter Review
Tests coming up this weekend.
Attachment #8647385 - Attachment is obsolete: true
Attachment #8656871 - Flags: review+
Attached patch Tests (obsolete) — Splinter Review
Passes fine locally.
Attachment #8657630 - Flags: review?(mratcliffe)
Attached patch Patch v1.2 (obsolete) — Splinter Review
Attachment #8656871 - Attachment is obsolete: true
Attachment #8657630 - Attachment is obsolete: true
Attachment #8657630 - Flags: review?(mratcliffe)
Attachment #8657631 - Flags: review+
Attached patch Tests (v1.1) (obsolete) — Splinter Review
Forgot to hg add the test.
Attachment #8657631 - Attachment is obsolete: true
Attachment #8657632 - Flags: review?(mratcliffe)
Comment on attachment 8657631 [details] [diff] [review]
Patch v1.2

Didn't mean to make this obsolete.
Attachment #8657631 - Attachment is obsolete: false
Comment on attachment 8657632 [details] [diff] [review]
Tests (v1.1)

Review of attachment 8657632 [details] [diff] [review]:
-----------------------------------------------------------------

Awesome work and a simple test.
Attachment #8657632 - Flags: review?(mratcliffe) → review+
Thanks !
Keywords: checkin-needed
Mike, any chance you can help me fix the test ? The logs don't have any obvious indications of what's going on, and I no longer have much time.
Flags: needinfo?(mratcliffe)
Sure, I will take over and ping you when I have a patch.
Assignee: ntim.bugs → mratcliffe
Flags: needinfo?(mratcliffe)
Priority: -- → P2
May have a test fix in hand.
Assignee: mratcliffe → ntim.bugs
Attached patch Patch v1.3 (rebased) (obsolete) — Splinter Review
Attachment #8657631 - Attachment is obsolete: true
Attachment #8657632 - Attachment is obsolete: true
Attachment #8705319 - Flags: review+
rebased as well
Attachment #8705322 - Flags: review+
forget to qref a change
Attachment #8705319 - Attachment is obsolete: true
Attachment #8705345 - Flags: review+
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=076517a33340

Also, Mike, you wanted to review this, so just pinging you so you don't forget.
Flags: needinfo?(mratcliffe)
(In reply to Tim Nguyen [:ntim] from comment #32)
> Try push:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=076517a33340
Relevant failure: https://treeherder.mozilla.org/logviewer.html#?job_id=15172944&repo=try
Seems the test takes too much time on Linux debug for some reason.

The actual testing in the storage inspector itself (the time between `checking window state` and the test end) takes less than a second. The rest of the test takes 50s to run.

This seems like a platform problem, not sure what's going on here.
:smaug, :mayhemer, any idea what's going on here ? (the blame says you touched the DOMStorage code recently, feel free to redirect the request)

If that helps, here's the relevant code for tests:
https://dxr.mozilla.org/mozilla-central/source/devtools/client/storage/test
and attachment 8705322 [details] [diff] [review].
Flags: needinfo?(honzab.moz)
Flags: needinfo?(bugs)
Pure guess, but do we end up falling back to non-cached storage somehow and doing plenty of sync IO?


Can you reproduce this locally?
Flags: needinfo?(bugs)
(In reply to Olli Pettay [:smaug] from comment #34)
> Pure guess, but do we end up falling back to non-cached storage somehow and
> doing plenty of sync IO?

Actually pretty impossible with the existing implementation.

> 
> 
> Can you reproduce this locally?

I may try.  However:

 15:18:20     INFO -  407 INFO TEST-PASS | devtools/client/storage/test/browser_storage_overflow.js | Table should display all 200 items after scrolling -
 15:18:20     INFO -  408 INFO Leaving test
 15:18:20     INFO -  409 INFO TEST-UNEXPECTED-FAIL | devtools/client/storage/test/browser_storage_overflow.js | This test exceeded the timeout threshold. It should be rewritten or split up. If that's not possible, use requestLongerTimeout(N), but only as a last resort. -
 

The test apparently passes, but hangs at shutdown.  Doesn't seem to be a DOM storage problem IMO..
Seems like the test triggers a lot of CSS reflows (os something), few stacks like these captured in a debug build while the test apparently hangs and browser eats 100% CPU for a long time:

Sample 1:

>	nss3.dll!_MD_CURRENT_THREAD() Line 312	C
 	nss3.dll!PR_GetCurrentThread(...) Line 144	C
 	xul.dll!nsStandardURL::AddRef() Line 965	C++
 	xul.dll!nsCOMPtr<nsIURI>::assign_with_AddRef(0x20a96c40) Line 1066	C++
 	xul.dll!nsCOMPtr<nsIURI>::operator=(0x20a96c40) Line 579	C++
 	xul.dll!`anonymous namespace'::CSSParserImpl::InitScanner({...}, {...}, 0x20a96c40, 0x20a96c40, 0x1e56d820) Line 1599	C++
 	xul.dll!`anonymous namespace'::CSSParserImpl::ParsePropertyWithVariableReferences(eCSSProperty_background_clip, eCSSProperty_background, {...}, 0x21d3b1a8, 0x001862c4, 0x20a96c40, 0x20a96c40, 0x1e56d820, 0x00000000, 0x000004fb, 0x000077d7) Line 2877	C++
 	xul.dll!nsCSSParser::ParsePropertyWithVariableReferences(eCSSProperty_background_clip, eCSSProperty_background, {...}, 0x21d3b1a8, 0x001862c4, 0x20a96c40, 0x20a96c40, 0x1e56d820, 0x00000000, 0x000004fb, 0x000077d7) Line 17267	C++
 	xul.dll!nsRuleNode::ResolveVariableReferences(nsStyleStructID_Reset_Start, 0x001862c4, 0x221b3940) Line 2235	C++
 	xul.dll!nsRuleNode::WalkRuleTree(nsStyleStructID_Reset_Start, 0x221b3940) Line 2338	C++
 	xul.dll!nsRuleNode::GetStyleData(nsStyleStructID_Reset_Start, 0x221b3940, true) Line 9802	C++
 	xul.dll!nsStyleContext::StyleData(nsStyleStructID_Reset_Start) Line 398	C++
 	xul.dll!mozilla::StyleAnimationValue::ExtractComputedValue(eCSSProperty_background_color, 0x221b3940, {...}) Line 2991	C++
 	xul.dll!mozilla::CommonAnimationManager::ExtractComputedValueForTransition(eCSSProperty_background_color, 0x221b3940, {...}) Line 283	C++
 	xul.dll!nsAnimationManager::BuildSegment({...}, eCSSProperty_background_color, {...}, 0.000000000, 0x22283750, 0x00000000, 1.00000000, 0x221b3940) Line 902	C++
 	xul.dll!nsAnimationManager::BuildAnimations(0x22283750, 0x22712380, 0x03e2ba00, {...}) Line 849	C++
 	xul.dll!nsAnimationManager::CheckAnimationRule(0x22283750, 0x22712380) Line 444	C++
 	xul.dll!nsStyleSet::GetContext(0x22285218, 0x22412280, 0x00000000, 0x00000000, ePseudo_NotPseudoElement, 0x22712380, 0x00000004) Line 977	C++
 	xul.dll!nsStyleSet::ResolveStyleFor(0x22712380, 0x22285218, {...}) Line 1386	C++
 	xul.dll!mozilla::ElementRestyler::RestyleSelf(0x224ee9f8, eRestyle_Subtree, 0x00186f44, {...}) Line 4011	C++
 	xul.dll!mozilla::ElementRestyler::Restyle(eRestyle_Subtree) Line 3287	C++
 	xul.dll!mozilla::ElementRestyler::ComputeStyleChangeFor(0x224ee9f8, 0x00187294, 0x00000000, {...}, eRestyle_Subtree, {...}, {...}, {...}) Line 4529	C++
 	xul.dll!mozilla::RestyleManager::ComputeAndProcessStyleChange(0x224ee9f8, 0x00000000, {...}, eRestyle_Subtree, {...}) Line 4940	C++
 	xul.dll!mozilla::RestyleManager::RestyleElement(0x22712380, 0x224ee9f8, 0x00000000, {...}, eRestyle_Subtree, {...}) Line 1055	C++
 	xul.dll!mozilla::RestyleTracker::ProcessOneRestyle(0x22712380, eRestyle_Subtree, 0x00000000, {...}) Line 196	C++
 	xul.dll!mozilla::RestyleTracker::DoProcessRestyles() Line 354	C++
 	xul.dll!mozilla::RestyleManager::ProcessRestyles({...}) Line 536	C++
 	xul.dll!mozilla::RestyleManager::ProcessPendingRestyles() Line 1781	C++
 	xul.dll!PresShell::FlushPendingNotifications({...}) Line 3983	C++
 	xul.dll!PresShell::FlushPendingNotifications(Flush_Layout) Line 3864	C++
 	xul.dll!nsDocument::FlushPendingNotifications(Flush_Layout) Line 8145	C++
 	xul.dll!mozilla::dom::Element::GetPrimaryFrame(Flush_Layout) Line 2122	C++
 	xul.dll!mozilla::dom::Element::GetStyledFrame() Line 575	C++
 	xul.dll!nsGenericHTMLElement::GetOffsetRect({...}) Line 331	C++
 	xul.dll!nsGenericHTMLElement::OffsetWidth() Line 295	C++
 	xul.dll!mozilla::dom::HTMLElementBinding::get_offsetWidth(0x03e30180, {...}, 0x2226c650, {...}) Line 1586	C++
 	xul.dll!mozilla::dom::GenericBindingGetter(0x03e30180, 0x00000000, 0x00188760) Line 2648	C++
 	xul.dll!js::CallJSNative(0x03e30180, 0x0f42dc9c, {...}) Line 235	C++
 	xul.dll!js::Invoke(0x03e30180, {...}, NO_CONSTRUCT) Line 460	C++
 	xul.dll!js::Invoke(0x03e30180, {...}, {...}, 0x00000000, 0x00000000, {...}) Line 512	C++
 	xul.dll!js::InvokeGetter(0x03e30180, {...}, {...}, {...}) Line 621	C++
 	xul.dll!CallGetter(0x03e30180, {...}, {...}, {...}, {...}) Line 1667	C++
 	xul.dll!GetExistingProperty<1>(0x03e30180, {...}, {...}, {...}, {...}) Line 1719	C++
 	xul.dll!NativeGetPropertyInline<1>(0x03e30180, {...}, {...}, {...}, NotNameLookup, {...}) Line 1934	C++
 	xul.dll!js::NativeGetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1968	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1471	C++
 	xul.dll!js::DirectProxyHandler::get(0x03e30180, {...}, {...}, {...}, {...}) Line 232	C++
 	xul.dll!js::CrossCompartmentWrapper::get(0x03e30180, {...}, {...}, {...}, {...}) Line 165	C++
 	xul.dll!xpc::AddonWrapper<js::CrossCompartmentWrapper>::get(0x03e30180, {...}, {...}, {...}, {...}) Line 180	C++
 	xul.dll!js::Proxy::get(0x03e30180, {...}, {...}, {...}, {...}) Line 300	C++
 	xul.dll!js::proxy_GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 572	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1470	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, 0x0dbc7fc0, {...}) Line 823	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}) Line 4044	C++
 	xul.dll!js::jit::ComputeGetPropResult(0x03e30180, 0x00188c90, JSOP_GETPROP, {...}, {...}, {...}) Line 2999	C++
 	xul.dll!js::jit::DoGetPropFallback(0x03e30180, 0x00188c90, 0x081d7758, {...}, {...}) Line 3060	C++


DumpJSStack():

0 Cell.prototype.flash() ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":1004]
    this = [object Object]
1 Column.prototype.onRowUpdated(event = "row-updated", id = "item-174") ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":610]
    this = [object Object]
2 EventEmitter_emit(aEvent = "row-updated", "item-174") ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/event-emitter.js":147]
    this = [object Object]
3 TableWidget.prototype.push(item = [object Object], suppressFlash = false) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":357]
    this = [object Object]
4 StorageUI.prototype.populateTable(data = [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], reason = 3) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/storage/ui.js":602]
    this = [object Object]
5 StorageUI.prototype.fetchStorageObjects/<( = [object Object]) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/storage/ui.js":324]
6 Handler.prototype.process() ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre




Sample 2:

>	xul.dll!mozilla::gfx::BaseRect<int,nsRect,nsPoint,nsSize,nsMargin>::BaseRect<int,nsRect,nsPoint,nsSize,nsMargin>(0x00000000, 0x0001caac, 0x000078e8, 0x000005a0) Line 56	C++
 	xul.dll!nsRect::nsRect(0x00000000, 0x0001caac, 0x000078e8, 0x000005a0) Line 46	C++
 	xul.dll!nsLeafBoxFrame::Reflow(0x21d47400, {...}, {...}, 0x00000000) Line 301	C++
 	xul.dll!nsLineLayout::ReflowFrame(0x2124e910, 0x00000000, 0x00000000, false) Line 944	C++
 	xul.dll!nsBlockFrame::ReflowInlineFrame({...}, {...}, {...}, 0x2124e910, 0x00185624) Line 4053	C++
 	xul.dll!nsBlockFrame::DoReflowInlineFrames({...}, {...}, {...}, {...}, 0x00000000, 0x00185724, 0x00185926, 0x00185748, true) Line 3887	C++
 	xul.dll!nsBlockFrame::ReflowInlineFrames({...}, {...}, 0x00185926) Line 3723	C++
 	xul.dll!nsBlockFrame::ReflowLine({...}, {...}, 0x00185926) Line 2729	C++
 	xul.dll!nsBlockFrame::ReflowDirtyLines({...}) Line 2264	C++
 	xul.dll!nsBlockFrame::Reflow(0x21d47400, {...}, {...}, 0x00000000) Line 1180	C++
 	xul.dll!nsFrame::BoxReflow({...}, 0x21d47400, {...}, 0x001880f8, 0x00000000, 0x00000000, 0x000078e8, 0x000005a0, true) Line 8873	C++
 	xul.dll!nsFrame::DoLayout({...}) Line 8613	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsSprocketLayout::Layout(0x078bb7e0, {...}) Line 488	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsSprocketLayout::Layout(0x21d3bfb8, {...}) Line 488	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsXULScrollFrame::LayoutScrollArea({...}, {...}) Line 4409	C++
 	xul.dll!nsXULScrollFrame::Layout({...}) Line 4600	C++
 	xul.dll!nsXULScrollFrame::DoLayout({...}) Line 1475	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsSprocketLayout::Layout(0x21e22880, {...}) Line 488	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsSprocketLayout::Layout(0x21d3b288, {...}) Line 488	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsSprocketLayout::Layout(0x1bb11108, {...}) Line 488	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsStackLayout::Layout(0x1bb10f38, {...}) Line 345	C++
 	xul.dll!nsBoxFrame::DoLayout({...}) Line 911	C++
 	xul.dll!nsIFrame::Layout({...}) Line 511	C++
 	xul.dll!nsBoxFrame::Reflow(0x21d47400, {...}, {...}, 0x00000000) Line 712	C++
 	xul.dll!nsRootBoxFrame::Reflow(0x21d47400, {...}, {...}, 0x00000000) Line 175	C++
 	xul.dll!nsContainerFrame::ReflowChild(0x1bb10f38, 0x21d47400, {...}, {...}, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000) Line 1037	C++
 	xul.dll!ViewportFrame::Reflow(0x21d47400, {...}, {...}, 0x00000000) Line 311	C++
 	xul.dll!PresShell::DoReflow(0x1bb10cc8, false) Line 8886	C++
 	xul.dll!PresShell::ProcessReflowCommands(false) Line 9053	C++
 	xul.dll!PresShell::FlushPendingNotifications({...}) Line 4023	C++
 	xul.dll!PresShell::FlushPendingNotifications(Flush_Layout) Line 3864	C++
 	xul.dll!nsDocument::FlushPendingNotifications(Flush_Layout) Line 8145	C++
 	xul.dll!mozilla::dom::Element::GetPrimaryFrame(Flush_Layout) Line 2122	C++
 	xul.dll!mozilla::dom::Element::GetStyledFrame() Line 575	C++
 	xul.dll!nsGenericHTMLElement::GetOffsetRect({...}) Line 331	C++
 	xul.dll!nsGenericHTMLElement::OffsetWidth() Line 295	C++
 	xul.dll!mozilla::dom::HTMLElementBinding::get_offsetWidth(0x03e30180, {...}, 0x2226c650, {...}) Line 1586	C++
 	xul.dll!mozilla::dom::GenericBindingGetter(0x03e30180, 0x00000000, 0x00188680) Line 2648	C++
 	xul.dll!js::CallJSNative(0x03e30180, 0x0f42dc9c, {...}) Line 235	C++
 	xul.dll!js::Invoke(0x03e30180, {...}, NO_CONSTRUCT) Line 460	C++
 	xul.dll!js::Invoke(0x03e30180, {...}, {...}, 0x00000000, 0x00000000, {...}) Line 512	C++
 	xul.dll!js::InvokeGetter(0x03e30180, {...}, {...}, {...}) Line 621	C++
 	xul.dll!CallGetter(0x03e30180, {...}, {...}, {...}, {...}) Line 1667	C++
 	xul.dll!GetExistingProperty<1>(0x03e30180, {...}, {...}, {...}, {...}) Line 1719	C++
 	xul.dll!NativeGetPropertyInline<1>(0x03e30180, {...}, {...}, {...}, NotNameLookup, {...}) Line 1934	C++
 	xul.dll!js::NativeGetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1968	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1471	C++
 	xul.dll!js::DirectProxyHandler::get(0x03e30180, {...}, {...}, {...}, {...}) Line 232	C++
 	xul.dll!js::CrossCompartmentWrapper::get(0x03e30180, {...}, {...}, {...}, {...}) Line 165	C++
 	xul.dll!xpc::AddonWrapper<js::CrossCompartmentWrapper>::get(0x03e30180, {...}, {...}, {...}, {...}) Line 180	C++
 	xul.dll!js::Proxy::get(0x03e30180, {...}, {...}, {...}, {...}) Line 300	C++
 	xul.dll!js::proxy_GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 572	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}, {...}) Line 1470	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, 0x0dbc7fc0, {...}) Line 823	C++
 	xul.dll!js::GetProperty(0x03e30180, {...}, {...}, {...}) Line 4044	C++
 	xul.dll!js::jit::ComputeGetPropResult(0x03e30180, 0x00188bb0, JSOP_GETPROP, {...}, {...}, {...}) Line 2999	C++
 	xul.dll!js::jit::DoGetPropFallback(0x03e30180, 0x00188bb0, 0x081d7758, {...}, {...}) Line 3060	C++


DumpJSStack():

0 Cell.prototype.flash() ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":1004]
    this = [object Object]
1 Column.prototype.onRowUpdated(event = "row-updated", id = "item-85") ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":610]
    this = [object Object]
2 EventEmitter_emit(aEvent = "row-updated", "item-85") ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/event-emitter.js":147]
    this = [object Object]
3 TableWidget.prototype.push(item = [object Object], suppressFlash = false) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/widgets/TableWidget.js":357]
    this = [object Object]
4 StorageUI.prototype.populateTable(data = [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], reason = 3) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/storage/ui.js":602]
    this = [object Object]
5 StorageUI.prototype.fetchStorageObjects/<( = [object Object]) ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/storage/ui.js":324]
6 Handler.prototype.process() ["resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/m



IMO, not a localStorage problem at all...
Flags: needinfo?(honzab.moz)
(In reply to Honza Bambas (:mayhemer) from comment #37)
> 
> IMO, not a localStorage problem at all...
It seems that :smaug's theory is correct, in comment 35, the try pushes with less localStorage items don't time out.
Maybe your theory is also correct, I'll test to be sure.
Nah, given that mayhemer managed to reproduce and got those stack traces even, it clearly shows the test is just doing too much layout-ish stuff.
Doesn't look like a storage issue.
(In reply to Olli Pettay [:smaug] from comment #39)
> Nah, given that mayhemer managed to reproduce and got those stack traces
> even, it clearly shows the test is just doing too much layout-ish stuff.
> Doesn't look like a storage issue.

Comment 35 probably makes sense as well then, as less layout stuff is being done if you remove items from the table.

Will give a look on how to get rid/do less of these reflows.

Thanks for your help, :mayhemer and :smaug !
Attachment #8705345 - Attachment description: Patch v1.4 (land before tests) → Part 1 - Add endless scrolling (v1.4)
Attachment #8705322 - Attachment description: Tests v1.2 → Part 2 - Test for endless scrolling (v1.2)
(In reply to Tim Nguyen [:ntim] from comment #42)
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=16bb3a0a89b6

The test now takes 42 seconds to run (and therefore no longer times out) with the CSS animation removed. Although, we might be able to save 10 more seconds by removing ~25-50 items. In the try pushes from comment 35, you can see removing 50 items (with the un-optimized CSS) saves ~15 seconds. Michael, what do you think ?
Attachment #8708811 - Flags: review?(mratcliffe) → review+
It looks great!

Let's land it like this as it should be fine.
Flags: needinfo?(mratcliffe) → needinfo?(ntim.bugs)
Sounds good !
Flags: needinfo?(ntim.bugs)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3e9da0e581c7
https://hg.mozilla.org/mozilla-central/rev/424bd0dc72e0
https://hg.mozilla.org/mozilla-central/rev/9331d1f393c2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
I reported this bug. Unfortunately, after testing I find this solution unsatisfactory. For two reasons:

1. There will be "gaps" in the list of keys. E.g. on the specified test URL the key sequence "key000" ... "key199" will show that some keys are omitted. When scrolling adds more keys to the table those gaps will be filled eventually, but that is not what the user would expect. The correct assumption and normal expectation is that missing key/value pairs are only *below* the current scroll range.

2. When the number of key/value pairs gets larger, scrolling becomes exceedingly slow, leading to hangs of many seconds and "Unresponsive script" warnings. This can be experienced when in the test URL the number of keys is increased to 2000. Perhaps the animations should be disabled on scrolling entirely? Animations probably should only occur when keys are added or values are changed, not when more keys come into view.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to ev548 from comment #48)
> I reported this bug. Unfortunately, after testing I find this solution
> unsatisfactory. For two reasons:
> 
> 1. There will be "gaps" in the list of keys. E.g. on the specified test URL
> the key sequence "key000" ... "key199" will show that some keys are omitted.
> When scrolling adds more keys to the table those gaps will be filled
> eventually, but that is not what the user would expect. The correct
> assumption and normal expectation is that missing key/value pairs are only
> *below* the current scroll range.
> 
> 2. When the number of key/value pairs gets larger, scrolling becomes
> exceedingly slow, leading to hangs of many seconds and "Unresponsive script"
> warnings. This can be experienced when in the test URL the number of keys is
> increased to 2000. Perhaps the animations should be disabled on scrolling
> entirely? Animations probably should only occur when keys are added or
> values are changed, not when more keys come into view.
These are indeed issues, but the root issue of this bug has been fixed. Please file new bugs.
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Depends on: 1246366
See Also: → 1246371
Depends on: 1242832
Product: Firefox → DevTools
Depends on: 1476647
Depends on: 1477290
Depends on: 1477296
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: