<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Oh yes, sorry about that. I originally had screen shots attached showing the timings but the email ended up being too large. All of the time is in the print. Nearly all other commands run within seconds. Oddly, after approximately half hour the prompt returns which I get one Sys.time() to execute but then the prompt hangs when I enter the second Sys.time() for the best part of an hour and half.<div class=""><br class=""></div><div class="">I tried to profile but that failed. I tried sampling the process a number of times and every time I sampled execution was buried in CGContextDrawPath<div class=""><div class="">GEPolygon (in libR.dylib) + 127 [0x101cb54df] engine.c:0</div><div class=""> + 2502 clipPolygon (in libR.dylib) + 571 [0x101cb574b] engine.c:1080</div><div class=""> + 2502 CGContextDrawPath (in CoreGraphics) + 181 [0x7fff8d433e59]</div><div class=""> + 2502 ripc_DrawPath (in libRIP.A.dylib) + 417 [0x7fff8ec631a3]</div><div class=""> + 2502 ripc_Render (in libRIP.A.dylib) + 380 [0x7fff8ec4f750]</div><div class=""> + 2502 RIPRenderCoverage (in libRIP.A.dylib) + 1844 [0x7fff8ec4ff84]</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Ashley</div><div class=""><br class=""></div><div class=""><img height="301" width="572" apple-width="yes" apple-height="yes" apple-inline="yes" id="C865FE7C-2AB5-44AC-AD79-41F810888EEA" src="cid:9B5D6A43-C237-4A36-99EE-8C7B5CF9E8EA" class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 9 Jul 2017, at 9:35 PM, peter dalgaard <<a href="mailto:pdalgd@gmail.com" class="">pdalgd@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hmm, you're not telling us much about where the time is being spent. Some more detailed timing using system.time() could be useful.<br class=""><br class="">If it is a graphics device issue, I would expect almost everything in the final print(plt). You could try switching graphics device, e.g. to pdf() which should be pretty much the same on all platforms. You might also try creating PDF files on one machine and displaying on the other. <br class=""><br class="">-pd <br class=""><br class=""><blockquote type="cite" class="">On 9 Jul 2017, at 12:45 , Ashley Betts <<a href="mailto:Ashley.Betts@saltbushsoftware.com" class="">Ashley.Betts@saltbushsoftware.com</a>> wrote:<br class=""><br class="">Hi All,<br class=""> I'm quite new to R and recently started investigating the geospatial plotting capabilities of R via ggplot2. I started by using some of the publicly available datasets from the Australian Bureau of Statistics. Plotting the Level 3 Statistical Area boundaries took over 2 hours on my 2012 Mac Book Pro. As there were over 3M rows in the fortify’ed data frame I initially thought this was just how long it must take. I then ran the exact same script on my work laptop which is similarly spec’ed and it ran in approximately 30 seconds. This now has me extremely disappointed in the performance on the Mac which is where I use R the most. I changed my BLAS library to the Accelerate library in a whim that this might make a difference. It did not. Whilst I primarily use RStudio I also ran the same script in R.app and if there was any improvement it was not noticeable. I did notice in the Windows run that it seemed to use multiple cores (which is what made me investigate the BLAS change) whilst the Mac seems to stay bound to a single core. My initial thoughts were that it must be something to do with ggplot but after sampling the rsession process a number of times (see attached Sample of rsession.txt) it appears to be spending most of it’s time in CGContextDrawPath in Apples CoreGraphics so I assume it is a Graphics related issue. I’m running R 3.4 on my Mac and 3.3.2 on the Windows machine. I’ve attached the script and have screen dumps of the process sample text and a number of others which I can supply if helpful in analysing the issue. Could someone possibly let me know if this is PEBCAK issue or an actual problem with R. If the later how do I go about getting the issue resolved?<br class=""><br class="">The SA3 boundary data is available here:<br class=""><br class=""><a href="http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1270.0.55.001July%202016?OpenDocument" class="">http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1270.0.55.001July%202016?OpenDocument</a><br class=""><br class="">as 'Statistical Area Level 3 (SA3) ASGS Ed 2016 Digital Boundaries in ESRI Shapefile Format’<br class=""><br class="">Regards,<br class=""><br class="">Ashley<br class=""><br class=""><aus_pop_analysis.R><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">R-SIG-Mac mailing list<br class="">R-SIG-Mac@r-project.org<br class="">https://stat.ethz.ch/mailman/listinfo/r-sig-mac<br class=""></blockquote><br class="">-- <br class="">Peter Dalgaard, Professor,<br class="">Center for Statistics, Copenhagen Business School<br class="">Solbjerg Plads 3, 2000 Frederiksberg, Denmark<br class="">Phone: (+45)38153501<br class="">Office: A 4.23<br class="">Email: <a href="mailto:pd.mes@cbs.dk" class="">pd.mes@cbs.dk</a> Priv: <a href="mailto:PDalgd@gmail.com" class="">PDalgd@gmail.com</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><div class=""><font class="Apple-style-span" face="'BlairMdITC TT'" size="2"><span class="Apple-style-span" style="font-size: 10px; ">Ashley Betts</span></font></div><div class=""><br class=""></div><div class=""><font class="Apple-style-span" face="'Bank Gothic'" size="4"><span class="Apple-style-span" style="font-size: 14px; ">Saltbush Software</span></font></div><div class=""><font class="Apple-style-span" face="'Bank Gothic'" size="2"><span class="Apple-style-span" style="font-size: 10px; ">Excellence in Software Engineering Practices</span></font></div><div class=""><font class="Apple-style-span" face="'Bank Gothic'" size="2"><span class="Apple-style-span" style="font-size: 10px; "><br class=""></span></font></div><div class=""><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "><b class="">email:</b></span></font><span class="Apple-converted-space"><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> </span></font></span><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "><a href="mailto:Ashley.Betts@saltbushsoftware.com" class="">Ashley.Betts@saltbushsoftware.com</a></span></font></div><div class=""><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> </span></font></span><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> <a href="mailto:Ashley.Betts@sbsw.com.au" class="">Ashley.Betts@sbsw.com.au</a><br class=""></span></font></div><div class=""><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "><b class="">web:</b></span></font><span class="Apple-converted-space"><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> </span></font><span class="Apple-converted-space"><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> </span></font></span></span><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "><a href="http://www.saltbushsoftware.com" class="">http://www.saltbushsoftware.com</a></span></font></div><div class=""><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> </span></font></span><font class="Apple-style-span" face="'Century Gothic'" size="1"><span class="Apple-style-span" style="font-size: 9px; "> <a href="http://www.sbsw.com.au" class="">http://www.sbsw.com.au</a></span></font><br class=""></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br class=""></div></div></body></html>