A framework for building native apps with React
682
Background timer execution
in progress
https://github.com/facebook/react-native/issues/167 "I wanted to start a discussion about the timers and an API that exposes the capabilities of the system timers. A couple of things I noticed were that the timers use CADisplayLink on the main thread and also listen to the UIApplication state notifications. To my knowledge this works well for timers that are coupled to the UI (requestAnimationFrame comes to mind, there may be other uses). I'd like to discuss timers that do other work e.g. interact with the event loop or schedule background tasks, and how they co-interact. Event loop timers seem to fall into two categories - those that run at the end of the current loop and those that run right after. This is like process.nextTick and setImmediate. These aren't too hard to implement though there are a couple of gotchas like warning if a process.nextTick handler endlessly schedules itself before blowing the stack. I would also expect both of these timers to run even if the app is inactive or backgrounded (e.g. say you get a network response while the app is backgrounded and schedule some work to run soon after - it should run in the background). Background task timers (setTimeout, setInterval) raise a couple of questions like the semantics of a zero-ms timeout. I would also propose that these run in the background as well to address the use of running code that does not need the app to be foregrounded. And, if the app is backgrounded there is little harm in running UI code anyway -- in cases where it does matter, the timer handler can check the UIApplication state. Background task timers that repeat are also good candidates for energy optimization. One thing that OS X systems do is coalesce timers where possible, partly aided by the programmer providing a tolerance value. If many running apps schedule timers that can overlap within their respective tolerance windows, the system may wake the CPU just once to run all of those tasks together." - @{ide}
226
1
Planning Your Visit to the Griffith Observatory
What is the best way to travel to the Griffith Observatory? The Griffith Observatory is located in Los Feliz, east of Hollywood, and is readily accessible. You can use driving directions to drive straight through Griffith Park and up to the observatory, where a tiny paid parking lot and street parking are available. Another alternative is to take the DASH shuttle bus from the Vermont–Sunset Red Line Metro station directly to the observatory if you prefer not to look for parking (since the observatory can get extremely busy). It runs 24 hours a day, 7 days a week, and the fare is only $0.50. You may even trek up to the observatory from Griffith Park if you're feeling brave. It takes roughly 30 minutes to walk from the bottom of the hill to the observatory if you utilize the Vermont Street entrance. Are you ready to go? For visitors to the observatory for the first time, here are some answers to frequently asked questions. Is there a good time to visit the Griffith Observatory? The observatory is always bustling with visitors. Because the circumstances are best for stargazing in the evenings, it can get quite crowded. People come to the Hollywood sign during the day to photograph it and admire the views of Los Angeles below. However, if you go throughout the day, you will be able to accomplish more. Not only can you see the displays within the observatory during the day, but you can also hike through Griffith Park, which is not possible at night. Is the observatory free of charge? The observatory is always free to enter, and you can walk around the grounds without going inside. The Samuel Oschin Planetarium offers lectures for $3-$7. An Otherworldly Night Out at the Griffith Observatory There's more to Los Angeles than celebrity sightings and seaside sunbathing if you're considering a trip there. The Griffith Observatory allows you to experience all of that and more in just a few hours. Los Angeles has an incredible architectural heritage and some amazing neighborhoods, and exploring the Griffith Observatory allows you to experience all of that and more in just a few hours. This free attraction is also too good to pass up, with spectacular views of the stars in the sky and magnificent vistas of Los Angeles. Get directions to Griffith Observatory: https://driving-directionsmaps.com/
1
Load More