473,396 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to "suspend" layout

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
I was wondering whenever it existed a method to tell browsers to suspend
the layout of the page while a js function is executed.
This problem arises from the fact that I'm currently trying to code a
page with many transparent elements (be they transparent PNGs or simply
elements with css opacity < 1) and every time I move or otherwise change
one of their (visual) properties, the browser has to repaint almost
everything.
This may be fine until you modify just one element once in a while, but
if you're trying to _animate_ multiple elements, the processor
skyrockets immediately to 100% and the animation, well... it's not quite
an animation.
So I thought that, maybe, there existed a (eventually even non-standard)
way to tell the browser not to repaint the elements until I
moved/modified all those I wish to. Something like:

function AnimationCallback() {
SuspendLayout();

// perform all elements manipulation here

ResumeLayout();
}

or the like.
While this won't solve the fact that browsers are still terribly slow
when handling transparencies, maybe it could help a bit.
Any insight on this would be much appreciated.
Thank you,
Carlo Alberto Ferraris
strayorange.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHP/eIypa2JhbVv6QRAtMTAJ9XPTE7CL+z3PEnMbmilm3qlfasQACg v0cO
XWFUOxkkEFmcUCz6N27H2U8=
=nr0j
-----END PGP SIGNATURE-----
Nov 18 '07 #1
3 4163
CAFxX wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please put this in the header or disable it for NetNews.

Your From header is also broken, see

- RFC1036 subsection 2.1.1
- RFC2822 subsection 3.4.1
- RFC 1855 subsection 3.1.1, and
- probably the Terms of Use of your access provider.
I was wondering whenever it existed a method to tell browsers to suspend
the layout of the page while a js function is executed.
This problem arises from the fact that I'm currently trying to code a
page with many transparent elements (be they transparent PNGs or simply
elements with css opacity < 1) and every time I move or otherwise change
one of their (visual) properties, the browser has to repaint almost
everything.
This may be fine until you modify just one element once in a while, but
if you're trying to _animate_ multiple elements, the processor
skyrockets immediately to 100% and the animation, well... it's not quite
an animation.
Try to use timeout/interval values that are not below the system
ticker interval. Values of 100 (ms) and above should be safe.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Nov 18 '07 #2
Thomas 'PointedEars' Lahn said the following on 11/18/2007 10:32 AM:
CAFxX wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please put this in the header or disable it for NetNews.

Your From header is also broken, see

- RFC1036 subsection 2.1.1
- RFC2822 subsection 3.4.1
- RFC 1855 subsection 3.1.1, and
- probably the Terms of Use of your access provider.
Probably the opposite as munged From headers are often encouraged by
access providers. Can't spam an address you don't have.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 18 '07 #3
Ed
On Nov 18, 2:27 am, CAFxX <usenet0...@REMOVEMEcafxx.cjb.netwrote:
So I thought that, maybe, there existed a (eventually even non-standard)
way to tell the browser not to repaint the elements until I
moved/modified all those I wish to. Something like:

function AnimationCallback() {
SuspendLayout();

// perform all elements manipulation here

ResumeLayout();

}
This article might be helpful:

http://dev.opera.com/articles/view/e...script/?page=3

This is also discussed here (see "Edit Subtrees Offline"):

http://www.peachpit.com/articles/art...&seqNum=5&rl=1
Nov 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Jane Austine | last post by:
As far as I know python's threading module models after Java's. However, I can't find something equivalent to Java's interrupt and isInterrupted methods, along with InterruptedException....
11
by: Jeffrey Hiess | last post by:
Something like getchar() doesn't work, since it "waits" for input. #include <stdio.h> while (1) { if (getchar()) /* break if any key is pressed */ { break; }
14
by: Ian Pilcher | last post by:
It's pretty common to see declarations such as: static volatile sig_atomic_t caught_signal = 0; C99 defines sig_atomic_t as a "... (possibly volatile-qualified) integer type of an object that...
11
by: Paminu | last post by:
Is there something like system("PAUSE") for linux?
3
by: kiplring | last post by:
Suppose a function which has Sleep() method in it. And I want to recycle it. I made two buttons which call "Resume()" and "Suspend()". But It doesn't work. The state of thread "t" will be...
3
by: Stephen Miller | last post by:
I have an ASP.Net application that sends a NetworkStream to a .Net Service, which has a TcpListener listening on a port for the ASP.Net client. When it receives a request it creates a new thread...
22
by: Brett | last post by:
I have a second thread, t2, that errors out and will stop. It's status is then "Stopped". I try to start t2 from thread 1, t1, by checking If t2.threadstate = "Stopped" Then t2.start() ...
25
by: MLH | last post by:
Is it a common occurrence for A97 VBA to 'RACE' on past a debug.print statement? I have been trying to debug a problem (which turned out to be an attempt to assign Null to a Date Type variable)...
5
by: msigwald | last post by:
I'm trying to write a little C program to run under linux, which must gain root so it can then shutdown the computer. I can get the code to execute the su command via system("su"), but once su...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.