# Mobile performance different between "present" and "full screen"

**URL:** <https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455>\
**Category:** Coding Questions\
**Created:** [July 26, 2021, 11:39pm UTC](https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455 "2021-07-26T23:39:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguelac](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@Miguelac](https://discourse.processing.org/u/Miguelac)\
**Post date:** [July 26, 2021, 11:39pm UTC](https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455/1 "2021-07-26T23:39:59Z")

</div>

Hi,  
I made a checkers game in p5 and it is working well, but I noticed a really strange behavior when using the share links. When I use “full screen” in my mobile (or mobile emulation with inspect mode in chrome) I get the normal behavior and everything works smoothly. However, when I use the “present” mode, the selection of the pieces is much more sluggish.

Full Screen mode:  
[https://editor.p5js.org/Miguelac/full/r4bnJ6j-Y](https://editor.p5js.org/Miguelac/full/r4bnJ6j-Y)

Present mode:  
[https://preview.p5js.org/Miguelac/present/r4bnJ6j-Y](https://preview.p5js.org/Miguelac/present/r4bnJ6j-Y)

Any Idea why this would be? My only guess is that there is something wrong with the way I coded the touch selection, but I can’t seem to see what.

---

<div class="post-metadata">

**Author:** ![Miguelac](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@Miguelac](https://discourse.processing.org/u/Miguelac)\
**Post date:** [August 3, 2021, 3:49pm UTC](https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455/2 "2021-08-03T15:49:28Z")

</div>

Same thing happens with another project.

Full (all ok):  
[https://editor.p5js.org/Miguelac/full/r2awDBUN0](https://editor.p5js.org/Miguelac/full/r2awDBUN0)

Present (very slow):  
[https://preview.p5js.org/Miguelac/present/r2awDBUN0](https://preview.p5js.org/Miguelac/present/r2awDBUN0)

Is this normal? Seems super strange to me to be honest.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [August 18, 2021, 6:20pm UTC](https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455/3 "2021-08-18T18:20:19Z")

</div>

I can’t replicate this in my (old) laptop with an up-to-date Chrome browser – when I interact at the two links above, both seem equally snappy. Can you add timing debug information? Something device-specific, maybe to Android?

https://editor.p5js.org/Miguelac/full/r4bnJ6j-Y

---

<div class="post-metadata">

**Author:** ![Miguelac](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@Miguelac](https://discourse.processing.org/u/Miguelac)\
**Post date:** [September 4, 2021, 7:40pm UTC](https://discourse.processing.org/t/mobile-performance-different-between-present-and-full-screen/31455/4 "2021-09-04T19:40:50Z")

</div>

I think I figured out the issue.  
It seems to be related to resolution. Basically the source-code of “full” sets a viewport but “present” doesn’t. To fix this I added:

```auto
<meta name="viewport" content="width=device-width, initial-scale=1.0">

```

just below the `<head>`

Without this it seems p5 ignores the pixel density and renders for the full screen resolution.
