Last Comment Bug 726634 - Fix the maximum nodes limitation in Tilt
: Fix the maximum nodes limitation in Tilt
Status: RESOLVED FIXED
[tilt]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Inspector (show other bugs)
: 12 Branch
: All All
: -- normal (vote)
: Firefox 13
Assigned To: Victor Porof [:vporof][:vp]
:
: Patrick Brosset <:pbro>
Mentors:
Depends on: 723937
Blocks: 725717
  Show dependency treegraph
 
Reported: 2012-02-13 09:25 PST by Victor Porof [:vporof][:vp]
Modified: 2012-02-27 01:11 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (13.64 KB, patch)
2012-02-14 09:43 PST, Victor Porof [:vporof][:vp]
rcampbell: review+
Details | Diff | Splinter Review

Description Victor Porof [:vporof][:vp] 2012-02-13 09:25:18 PST
If a webpage has more than ~5000 nodes, it will be chopped off in Tilt, in a quite ugly fashion. This shouldn't happen.
Comment 1 Victor Porof [:vporof][:vp] 2012-02-14 09:43:38 PST
Created attachment 597058 [details] [diff] [review]
v1
Comment 2 Victor Porof [:vporof][:vp] 2012-02-14 13:54:33 PST
Try: https://tbpl.mozilla.org/?tree=Try&rev=47af48d6e93e
Comment 3 Rob Campbell [:rc] (:robcee) 2012-02-17 16:12:48 PST
Comment on attachment 597058 [details] [diff] [review]
v1

+// index buffer of 12 unsigned int elements, obviously one for each vertex;

"obviously"

+// if a webpage has enough nodes to overflow the index buffer elements size,

+const MAX_GROUP_NODES = Math.pow(2, Uint16Array.BYTES_PER_ELEMENT * 8) / 12 - 1;

when does a Uint16Array have something other than 2 bytes per element? This feels like we could hardcode the value.

Also, this returns a non-integer value of 5460.333333333333. That seems... imprecise.

+    for (let i = 0, len = mesh.length; i < len; i++) {

presumably, the number of mesh groups is going to be 1 in most cases?

I'm gonna shelf this until my brain can process the rest of it.
Comment 4 Victor Porof [:vporof][:vp] 2012-02-17 16:55:30 PST
(In reply to Rob Campbell [:rc] (robcee) from comment #3)
> Comment on attachment 597058 [details] [diff] [review]
> v1
> 
> +const MAX_GROUP_NODES = Math.pow(2, Uint16Array.BYTES_PER_ELEMENT * 8) / 12
> - 1;
> 
> when does a Uint16Array have something other than 2 bytes per element? This
> feels like we could hardcode the value.
> 

I don't know.. on quantum computers? On Darth Vader's helmet? :)
Why hardcode the value if there's a logical formula to get it?

> Also, this returns a non-integer value of 5460.333333333333. That seems...
> imprecise.
> 

Doesn't affect anything. I can parseInt if you wish.

> +    for (let i = 0, len = mesh.length; i < len; i++) {
> 
> presumably, the number of mesh groups is going to be 1 in most cases?
> 

Yup.
Comment 5 Rob Campbell [:rc] (:robcee) 2012-02-21 03:14:59 PST
(In reply to Victor Porof from comment #4)
> (In reply to Rob Campbell [:rc] (robcee) from comment #3)
> > Comment on attachment 597058 [details] [diff] [review]
> > v1
> > 
> > +const MAX_GROUP_NODES = Math.pow(2, Uint16Array.BYTES_PER_ELEMENT * 8) / 12
> > - 1;
> > 
> > when does a Uint16Array have something other than 2 bytes per element? This
> > feels like we could hardcode the value.
> > 
> 
> I don't know.. on quantum computers? On Darth Vader's helmet? :)

lol, imo.

> Why hardcode the value if there's a logical formula to get it?

Ok, fair enough.

> > Also, this returns a non-integer value of 5460.333333333333. That seems...
> > imprecise.
> > 
> 
> Doesn't affect anything. I can parseInt if you wish.

maybe a Math.floor()?

> > +    for (let i = 0, len = mesh.length; i < len; i++) {
> > 
> > presumably, the number of mesh groups is going to be 1 in most cases?
> 
> Yup.

OK.
Comment 6 Rob Campbell [:rc] (:robcee) 2012-02-24 06:49:45 PST
https://hg.mozilla.org/integration/fx-team/rev/80e183c9caff
Comment 7 Tim Taubert [:ttaubert] 2012-02-27 01:11:58 PST
https://hg.mozilla.org/mozilla-central/rev/80e183c9caff

Note You need to log in before you can comment on or make changes to this bug.