<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Performance &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Mon, 05 Jan 2026 20:45:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>When Doing More Is Faster: A Curious Xojo Performance Test</title>
		<link>https://blog.xojo.com/2026/01/05/when-doing-more-is-faster-a-curious-xojo-performance-test/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Mon, 05 Jan 2026 20:45:13 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[ARM64]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15751</guid>

					<description><![CDATA[I ran across something recently that had me truly scratching my head. My goal was to measure how much extra time it would take for&#8230;]]></description>
										<content:encoded><![CDATA[
<p>I ran across something recently that had me truly scratching my head. My goal was to measure how much extra time it would take for some additional functionality I wished to add to a project. The initial code was performing a query on a table in a database and then looping through the RowSet returned to populate five columns of a DesktopListBox with each row from the RowSet. I created a new project to test a simple form of the code. I added some code to measure the performance in microseconds. Next, I created an identical test except this time there was an extra line of code inside the loop that assigned a DatabaseRow from the RowSet to the row&#8217;s RowTag. This was the extra functionality I wanted. The tests would show me the cost of this functionality in terms of performance.</p>



<h2 class="wp-block-heading">Test 1</h2>



<pre class="wp-block-code"><code>Var rs As rowset = SQLiteDatabase1.SelectSQL("SELECT invoices.invoiceno, invoices.invoicedate, invoices.invoiceamount, customers.firstname, customers.lastname FROM Invoices JOIN Customers ON invoices.customerid = customers.id")
Results1.RemoveAllRows
Var grandTotal As Integer
Var totalIterations As Integer  = 10
For i As Integer = 1 To totalIterations
  Var start As Integer = System.Microseconds
  For Each row As databaserow In rs
    ListBox1.AddRow(rs.Column("InvoiceNo"), rs.Column("lastname"), rs.Column("firstname"), rs.Column("InvoiceDate"), rs.Column("InvoiceAmount"))
  Next
  Var stop As Integer = System.Microseconds
  Var total As Integer = stop - start
  grandTotal = grandTotal + total
  Results1.AddRow("Test " + i.ToString + ": " + total.ToString)
Next
Var avg As Integer = grandTotal / totalIterations
results1.AddRow("Average: " + avg.ToString)</code></pre>



<h2 class="wp-block-heading">Test 2</h2>



<pre class="wp-block-code"><code>Var rs As rowset = SQLiteDatabase1.SelectSQL("SELECT invoices.invoiceno, invoices.invoicedate, invoices.invoiceamount, customers.firstname, customers.lastname FROM Invoices JOIN Customers ON invoices.customerid = customers.id")
Results2.RemoveAllRows
Var grandTotal As Integer
Var totalIterations As Integer  = 10
For i As Integer = 1 To totalIterations
  Var start As Integer = System.Microseconds
  For Each row As databaserow In rs
    ListBox1.AddRow(rs.Column("InvoiceNo"), rs.Column("lastname"), rs.Column("firstname"), rs.Column("InvoiceDate"), rs.Column("InvoiceAmount"))
    <strong>ListBox1.RowTagAt(ListBox1.LastAddedRowIndex) = row</strong>
  Next
  Var stop As Integer = System.Microseconds
  Var total As Integer = stop - start
  grandTotal = grandTotal + total
  Results2.AddRow("Test " + i.ToString + ": " + total.ToString)
Next
Var avg As Integer = grandTotal / totalIterations
results2.AddRow("Average: " + avg.ToString)</code></pre>



<p>I assumed the second test would take longer since it&#8217;s doing the extra step of assigning the row to the RowTag property. However, when I ran the test, something curious occurred. The second test, rather than taking more time to complete, took <em>less</em>. This made no sense to me. It&#8217;s doing <em>more</em> so it should take longer. It&#8217;s not logical that asking it to do more would result in the task taking less time. After examining my code, I could not find any issues with it.</p>



<p>I modified the code to run each test 10 times then compute the average of all 10 tests. Depending on the run, the average time for Test 2 was nearly always shorter. Occasionally the average for Test 1 would be shorter than Test 2 but rarely. In fact, on my M4-based MacBook Pro, Test 2&#8217;s average was, in most cases, anywhere from 5% to 25% faster than Test 1. Next I tested it on an M1-based MacBook Pro with similar results. Then I tested it on an x86-based PC running Windows 11. This time Test 2 was slightly slower than Test 1 as I had been expecting from the beginning. Last but not least, I tested on Windows 11 running via Parallels on my MacBook Pro, compiling for ARM-64. In this test, Test 2 was indeed faster. I tried running these tests by changing the order (Test 1 then Test 2 followed by Test 2 then Test 1) and by quitting between runs. None of that seemed to matter.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="693" src="https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x-1024x693.png" alt="" class="wp-image-15752" srcset="https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x-1024x693.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x-300x203.png 300w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x-768x520.png 768w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x-1536x1040.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.10@2x.png 1628w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="693" src="https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x-1024x693.png" alt="" class="wp-image-15753" srcset="https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x-1024x693.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x-300x203.png 300w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x-768x520.png 768w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x-1536x1040.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/01/CleanShot-2026-01-05-at-13.37.17@2x.png 1628w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The difference appears to be ARM. It could be the compiler or the CPU. Our Director of Engineering, Travis Hill, suspects that perhaps something like the branch predictor in the CPU is hopping a <em>tiny</em> bit faster because of the extra assignment and thus can better predict the next operation with the For Each loop. That could be. The timing is in microseconds so the difference is so small that for my purposes, it doesn&#8217;t matter. However, that it&#8217;s faster to do more work in this case is fascinating and unexpected.</p>



<p>In any case, it&#8217;s interesting to see code behave in a way that is so counterintuitive. Asking the method to do more, at least on ARM-based machines, caused the method to take less time.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>5 Tips for Optimizing Your Xojo Apps for Performance</title>
		<link>https://blog.xojo.com/2025/02/27/5-tips-for-optimizing-your-xojo-apps-for-performance/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Thu, 27 Feb 2025 14:00:00 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Optimization]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14541</guid>

					<description><![CDATA[Performance can be a make-or-break feature for any application, especially when users expect smooth interactions and quick results. Luckily, Xojo provides tools and techniques you&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Performance can be a make-or-break feature for any application, especially when users expect smooth interactions and quick results. Luckily, <a href="https://xojo.com" data-type="link" data-id="https://xojo.com" target="_blank" rel="noreferrer noopener">Xojo</a> provides tools and techniques you can leverage to ensure your apps run as efficiently as possible.</p>



<p>However, functionality should take priority during the initial implementation. Focus on getting the app or feature working correctly and bug-free before considering optimization. Performance improvements are best handled in subsequent iterations. Remember, &#8220;Early optimization is the root of all evil.&#8221;</p>



<p>Here are five tips to consider when building or refining your Xojo applications.</p>



<h2 class="wp-block-heading">1. Identify Bottlenecks with the Xojo Profiler</h2>



<p>Before diving into specific optimizations, you need to determine where your app is spending the most time. Xojo’s built-in Profiler provides detailed information on method execution time, helping you isolate trouble spots.</p>



<ul class="wp-block-list">
<li><strong>Enable the Profiler</strong>: In the Build Settings for your project, ensure “Profiling” is turned on. Then run your application in Debug mode.</li>



<li><strong>Analyze Results</strong>: After closing your app, review the profiler report to see which methods and lines of code took the longest time.</li>



<li><strong>Focus on High-Impact Areas</strong>: Tackle the biggest time sinks first—a small fix in a heavily accessed function can lead to noticeable performance gains.</li>
</ul>



<p><strong>Pro Tip</strong>: Limit changes to one area at a time, then re-profile. This approach helps confirm whether your optimizations actually improved performance. Read more about the Code Profiler feature: <a href="https://documentation.xojo.com/getting_started/debugging/code_profiler.html#getting-started-debugging-code-profiler-using-the-code-profiler">https://documentation.xojo.com/getting_started/debugging/code_profiler.html#getting-started-debugging-code-profiler-using-the-code-profiler</a></p>



<h2 class="wp-block-heading">2. Use Efficient Data Structures and Algorithms</h2>



<p>Choosing data structures wisely can dramatically impact speed, especially in data-intensive applications.</p>



<ul class="wp-block-list">
<li><strong>Arrays vs. Dictionaries</strong>: For large datasets with frequent lookups, a Dictionary can deliver faster lookups compared to an array, especially when searching by a key.</li>



<li><strong>Avoid Repetitive Property Lookups</strong>: If you access the same class property or control value repeatedly inside a loop, store it in a local variable first. This minimizes overhead each iteration.</li>



<li><strong>Algorithmic Complexity</strong>: Review algorithms for large tasks. Nested loops that appear simple could become extremely slow for bigger data sets. If possible, replace them with more efficient sorting and searching methods.</li>
</ul>



<p><strong>Example</strong>: Instead of repeatedly using&nbsp;<code>myArray.IndexOf(item)</code>&nbsp;inside a loop, store the index in a variable once or switch to a Dictionary for faster lookups.</p>



<h2 class="wp-block-heading">3. Offload Work to Threads</h2>



<p>Making your application responsive often means running time-consuming tasks in the background.</p>



<ul class="wp-block-list">
<li><strong>Why Threads Help</strong>: Xojo threads let you perform lengthy computations without freezing the main UI. This creates a better user experience and can let users continue working while the app processes data.</li>



<li><strong>Identify Good Candidates</strong>: Processing data, network transactions, or any tasks that take more than a fraction of a second can benefit from being threaded.</li>
</ul>



<p><strong>Pro Tip</strong>: If you only have a short delay (like reading a small file), threading may introduce complexity. Focus on threading tasks that truly benefit from parallel or asynchronous execution.</p>



<h2 class="wp-block-heading">4. Manage File and Network I/O Efficiently</h2>



<p>Disk access and network requests tend to be some of the biggest performance bottlenecks.</p>



<ul class="wp-block-list">
<li><strong>Batch Operations</strong>: Rather than reading or writing data one line at a time in a loop, try batching reads/writes to minimize overhead.</li>



<li><strong>Cache Strategically</strong>: If your app frequently loads the same data (like configuration files), store it in memory for quick access.</li>



<li><strong>Asynchronous Calls</strong>: For tasks requiring large data transfers or multiple network requests, consider asynchronous approaches so the UI remains responsive.</li>
</ul>



<p><strong>Example</strong>: When generating reports, accumulate data in a buffer or in-memory structure, and then perform a single file write at the end, instead of dozens or hundreds of small writes.</p>



<h2 class="wp-block-heading">5. Mind Your Loops and String Operations</h2>



<p>Nested loops and repetitive string concatenations are particularly notorious performance killers.</p>



<ul class="wp-block-list">
<li><strong>Minimize Nested Loops</strong>: Combine or break up loops that needlessly repeat the same work. For example, a single pass that filters and sorts data is typically faster than two separate loops.</li>



<li><strong>Efficient String Handling</strong>: Building long strings in a tight loop using the&nbsp;<code>+</code>&nbsp;operator can degrade performance because strings are immutable in many languages, and repeated concatenation can cause extra memory allocations.</li>



<li><strong>Use Add</strong>: If you’re concatenating parts of a string repeatedly, consider using an array combined with&nbsp;<code>String.FromArray</code> for more efficient handling.</li>
</ul>



<p><strong>Example</strong>: Instead of doing:</p>



<pre class="wp-block-code"><code>Var largeString As String
For i As Integer = 0 To 1000
  largeString = largeString + "line " + i.ToString
Next</code></pre>



<p>…collect lines in a String array, then&nbsp;<code><code>String.FromArray</code>()</code>&nbsp;them once. You’ll often see a significant speed boost in large-scale operations.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Optimizing your Xojo apps for performance doesn’t have to be an intimidating process. With the right tools (such as the Code Profiler) and a focus on data structures, threading, efficient I/O, and mindful loop/ string operations, you can significantly speed up your apps and keep the user experience smooth.</p>



<p>Remember to quantify the results by measuring before and after each change. By continuously profiling and fine-tuning your code, you’ll create compelling, efficient Xojo applications that delight your users.</p>



<p>Have fun optimizing and don’t forget to share your own performance tips or success stories in the <a href="https://forum.xojo.com/" data-type="link" data-id="https://forum.xojo.com/" target="_blank" rel="noreferrer noopener">Xojo community forums</a>!</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What&#8217;s New in Xojo Web in 2024r2</title>
		<link>https://blog.xojo.com/2024/06/26/whats-new-in-xojo-web-in-2024r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 26 Jun 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r2]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13201</guid>

					<description><![CDATA[We're excited about Xojo 2024r2. Performance, control sets, improvements for current controls and bug fixes. You will love this release.]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;re excited about Xojo 2024r2. Performance, control sets, improvements for current controls and bug fixes. You will love this release.</p>



<h2 class="wp-block-heading"><strong>Control Sets</strong></h2>



<p>There are cases where you have a bunch of controls with the same functionality. Imagine you are coding a calculator and you&#8217;ve just added the WebButtons for each digit. It would be repetitive and error prone to add the same code to Pressed events, on each button when the only thing that changes is the numeric value.</p>



<p>A set of controls can be grouped, so you can think about them like if you were using an array. You can add event handlers to the group itself. Events will be enhanced with an &#8220;index&#8221; parameter, to help you decide what to do, depending on the element.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="982" src="https://blog.xojo.com/wp-content/uploads/2024/06/Session-1024x982.png" alt="" class="wp-image-13202" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Session-1024x982.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Session-300x288.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Session-768x736.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Session.png 1116w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Create Tabs and Embed Controls at Runtime in WebTabPanel and WebPagePanel</h2>



<p>Same as with Control Sets, this is something that was already present in Desktop projects and we wanted to include it for Web. From now on, you will be able to create and remove tabs and pages in WebTabPanel and WebPagePanel controls, respectively. Controls can also be added and removed at runtime, or move controls between tabs or pages whenever you need.</p>



<p>This opens a new world of possibilities for your applications, where you can provide your end users a way to have multiple contexts open at the same time.</p>



<figure class="wp-block-video"><video height="902" style="aspect-ratio: 1648 / 902;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.05.26.mp4.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>WebListBox: Configurable Header and Row Height, Border and Line Style</strong></h2>



<p>You will be able to configure the height of WebListBox headers and rows with the same API you are used to using in your Desktop projects. You won&#8217;t need to tweak them with CSS anymore.</p>



<figure class="wp-block-video"><video height="1018" style="aspect-ratio: 1648 / 1018;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.08.01.mp4.mp4"></video></figure>



<p><a href="https://documentation.xojo.com/versions/2024r2/api/user_interface/web/weblistbox.html#weblistbox-hasborder">HasBorder</a> and <a href="https://documentation.xojo.com/versions/2024r2/api/user_interface/web/weblistbox.html#weblistbox-gridlinestyle">GridLineStyle</a> has also been added to Web projects, allowing you to remove the outside border, display only vertical lines between the columns&#8230; or just remove them.</p>



<h2 class="wp-block-heading"><strong>WebDataSource Interface</strong></h2>



<p>Speaking of WebListBox improvements, you&#8217;ll find that the WebDataSource is easier to implement. You won&#8217;t need to implement SortedPrimaryKeys and UnsortedPrimaryKeys methods anymore.</p>



<p>There are only three methods required now:</p>



<ul class="wp-block-list">
<li><strong>ColumnData</strong>: Where you will define the amount of columns, names, and configure if they are sortable</li>



<li><strong>RowCount</strong>: So the control can now the amount of space it will need</li>



<li><strong>RowData</strong>: This is where you return an array of rows</li>
</ul>



<p>WebListBox lazy load rows, meaning that it will only ask your DataSource for the amount of rows being displayed on screen. It will only fetch more when needed.</p>



<h2 class="wp-block-heading"><strong>WebListBox Improvements When Using a WebDataSource</strong></h2>



<p>Using a WebListBox with a DataSource makes it possible to display very large amounts of data. Until now, you were able to display thousands of rows very quickly. This release improves the way Xojo uses your DataSource, without having to change a line of code in your projects.</p>



<p>Scrolling through the data will display the rows much faster than before. Just for comparison, 2024r1.1 was able to display 1 million rows in about 6 seconds in my computer. The same project, using 2024r2, can display them in less than 100ms.</p>



<p>But is not just the speed that has been improved. Its memory footprint has been dramatically reduced as well. Displaying 1 million records in 2024r1.1 used about 1 GB of RAM, where 2024r2 will use just a few MB instead.</p>



<p>I can&#8217;t imagine a use case where you need to display millions of rows and scroll through them. But if you find one, you will be able to implement it with Xojo <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2 class="wp-block-heading"><strong>WebButtons Can be Resized Now</strong></h2>



<p>In order to make it easier to migrate your Web 1 projects, you will be able to modify the height of your WebButtons. The web framework will also take care to reduce the font size if needed when the button is smaller.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="844" src="https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-1024x844.png" alt="" class="wp-image-13205" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-1024x844.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-300x247.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-768x633.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me.png 1425w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><strong>Individual Indicator for Each Segment of WebSegmentedButton</strong></h2>



<p>There are situations where you want to mix different &#8220;indicators&#8221; (different colors) in a single WebSegmentedButton control. For example, pressing on one of the segments can be a destructive action, so you could use the Danger indicator. By default, segments will use the indicator you set in the Inspector panel, but you will be able now to individually override one of them.</p>



<pre class="wp-block-code"><code>Me.Indicator = WebUIControl.Indicators.Primary
Me.SegmentAt(1).Indicator = WebUIControl.Indicators.Danger
Me.SegmentAt(2).Indicator = WebUIControl.Indicators.Success</code></pre>



<p>Having 4 segments, this will be the result of above example at runtime:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="724" height="220" src="https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38.png" alt="" class="wp-image-13331" srcset="https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38.png 724w, https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38-300x91.png 300w" sizes="auto, (max-width: 724px) 100vw, 724px" /></figure>



<h2 class="wp-block-heading">Outlined WebButton and WebSegmentedButton</h2>



<p>Some GUIs could become overwhelming, when every button looks like a call to action. The new Outlined property, available in WebButton and WebSegmentedButton controls, can help with heavily loaded interfaces. Here is how it looks like:</p>



<figure class="wp-block-video"><video height="822" style="aspect-ratio: 1648 / 822;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-12.40.05.mp4.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>Performance, Memory Leaks, Bug Fixes</strong></h2>



<p>Last, but not least, 2024r2 comes with great performance improvements. We&#8217;ve been improving the web server to handle even more requests per second. If you are using Xojo Web for exposing an API, it will be able to serve more requests in less time. For regular Xojo Web applications, it means it will be able to handle more events and reply to them faster.</p>



<p>Here is a comparison of the same project during the different releases of Xojo:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="810" src="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1024x810.png" alt="" class="wp-image-13207" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1024x810.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-300x237.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-768x608.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic.png 1407w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Latency has also been improved, Xojo is able already to reply in less than 2ms:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="810" src="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-1024x810.png" alt="" class="wp-image-13208" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-1024x810.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-300x237.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-768x608.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1.png 1422w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you are still serving Web APIs with Web 1, this is a good opportunity to migrate:</p>



<figure class="wp-block-table"><table><tbody><tr><td><br></td><td><strong>2019r3.2</strong></td><td><strong>2024r2</strong></td></tr><tr><td>Average Latency</td><td>133.4 ms</td><td>1.98 ms</td></tr><tr><td>Max Latency</td><td>287.3 ms</td><td>143.52 ms</td></tr><tr><td>Requests per second</td><td>76</td><td>8900</td></tr><tr><td>Transfer Rate</td><td>9.89 KB/s</td><td>1.5 MB/s</td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong>That&#8217;s a Wrap!</strong></h2>



<p>As usual, I&#8217;d like to send a big thank you to everyone taking the time creating bug reports, feature requests and testing beta releases. This wouldn&#8217;t be possible without your support.</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.05.26.mp4.mp4" length="172691" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.08.01.mp4.mp4" length="300122" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-12.40.05.mp4.mp4" length="156104" type="video/mp4" />

			</item>
		<item>
		<title>Improvements to Xojo Web in Xojo 2024r1</title>
		<link>https://blog.xojo.com/2024/03/26/popovers-and-other-improvements-in-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 26 Mar 2024 15:27:06 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r1]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12684</guid>

					<description><![CDATA[Our web framework continues improving, with interesting new features and tons of bug fixes. Let’s take a look to some highlighted 2024r1 changes!]]></description>
										<content:encoded><![CDATA[
<p>Our web framework continues improving, with interesting new features and tons of bug fixes. Let’s take a look to some highlighted 2024r1 changes!</p>



<h2 class="wp-block-heading">Popovers</h2>



<p>Similar to WebDialogs, popovers give you the opportunity to improve your apps’ UX. They are ephemeral screens where you can place text and controls.</p>



<p>Unlike the WebDialog, which is always centered and prevents the user to interact with other controls, Popovers can be placed on specific controls, where that information matters.</p>



<p>Think about them as enhanced “contextual menus” but, instead of just plain text menus, you can add anything you like. Have you ever dreamed of adding a WebMapViewer into some sort of contextual menu? Now you can!</p>



<p>The API is very simple. Create a container, add some controls and that’s it, really. You will just have to create a new instance of that container and show it as a Popover, specifying the control it should be pointing to.</p>



<p>Let’s say you have a container, called “MyTextFieldContainer”, and you want to display it below a WebLabel called “MyLabel”. Here is the code:</p>



<pre class="wp-block-code"><code>Var c As New MyTextFieldContainer
c.ShowPopover(MyLabel)</code></pre>



<p>By default, it will be shown below the specified control, but if you want to show it in a different place, you can use the new DisplaySides enumeration. As easy as this:</p>



<pre class="wp-block-code"><code>Var c As New TextFieldContainer
c.ShowPopover(MyLabel, WebContainer.DisplaySides.Top)</code></pre>



<p>As you can see, Web Projects’ Popovers are just container instances that you will show dynamically. That gives you the opportunity to raise events, add custom computed properties or implement the Observer interface. If you are already familiar with Containers, you already know how to use Popovers. Learn more about <a href="https://blog.xojo.com/2024/03/26/popovers-for-xojo-desktop-web-and-ios/">Popovers</a>.</p>



<h2 class="wp-block-heading">Displaying contextual menus programmatically</h2>



<p>Sometimes Popovers could be overkill for the task. If you just want to display a menu with some textual items inside, a contextual menu might be enough.</p>



<p>Imagine you have a WebTextLabel where you want to display the contextual menu whenever the user Presses on it. In its Opening event you could define the ContextualMenu:</p>



<pre class="wp-block-code"><code>Var menu As New WebMenuItem
menu.AddMenuItem("Foo")
menu.AddMenuItem("Bar")
menu.AddMenuItem("Baz")

Me.ContextualMenu = menu</code></pre>



<p>Implement the WebLabel.Pressed event and add this code:</p>



<pre class="wp-block-code"><code>Me.ContextualMenu.PopUp</code></pre>



<p>As easy as that.</p>



<h2 class="wp-block-heading">New RemoveControl method</h2>



<p>WebViews controls, like WebPage and WebContainer, now supports removing controls. This gives you the missing piece to create GUIs programmatically, as AddControl was already supported .</p>



<p>This can be useful when you are presenting a form to your end user with an unknown amount of fields.</p>



<p>For example, your user is filling the profile and you want to support having multiple contact fields. Some users will want to add 1 phone, others 2, and others would prefer to be contacted just by email.</p>



<p>Adding and removing controls dynamically gives you the opportunity to build this kind of features. Instead of adding a fixed amount of contact methods, you can adapt your app to what your user really needs.</p>



<h2 class="wp-block-heading">Performance and memory usage improvements</h2>



<p>We’re landing at my favorite part, improvements that nobody will see… unless you want to share your server monitoring stats, which is cool.</p>



<p>2024r1 comes with less Disk I/O usage. In my own benchmarks, Xojo Web is now able to serve about 1200 requests per second via the WebApplication.HandleURL event. That’s around a nice 20% more, compared to the previous version.</p>



<p>Also, thanks to Jeremie Leroy (one of our Xojo MVPs) and Bruno Fréchette, we’ve managed to identify and fix some memory leaks. In 2024r1, your web application will be doing a better job at cleaning up after processing requests.</p>



<h2 class="wp-block-heading">Bug fixes</h2>



<p>The list of fixes is big, you can inspect the whole list in the <a href="https://documentation.xojo.com/resources/release_notes/2024r1.html">2024r1 Release Notes</a> page.</p>



<p><strong>Web fixes by category:</strong></p>



<ul class="wp-block-list">
<li>Compiler: 1</li>



<li>IDE: 7</li>



<li>Framework: 40</li>
</ul>



<p>18 extra regressions were reported and fixed during the beta period. A huge thank you to everyone taking the time to test our releases and reporting issues before the final release becomes available.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>We hope you are as excited as we are for this release. I’m personally looking forward to see what you’re building, please remember to mention us on your favorite social network so we all can see what you’re working on.</p>



<p>In the meantime, we are already working hard preparing our next release, 2024r2. Spoilers: You will love it!</p>



<p>Happy coding!</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Performance Improvements in Xojo Web</title>
		<link>https://blog.xojo.com/2023/12/12/performance-improvements-in-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 12 Dec 2023 14:30:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[2023r4]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12313</guid>

					<description><![CDATA[The last big Xojo release in 2023 comes with a lot of performance improvements everywhere. The Xojo IDE itself is faster, which gives you Time to Reflect on Stack Optimization. In this post, I want to detail those improvements in Xojo 2023r4 that target Xojo Web including faster HandleURL responses, faster transfer rates in Windows and Linux, static assets cache control, Events improvements and a new experimental option.]]></description>
										<content:encoded><![CDATA[
<p>The last big Xojo release in 2023 comes with a lot of performance improvements everywhere. The Xojo IDE itself is <a href="https://blog.xojo.com/2023/12/12/small-and-simple-changes-to-speed-up-the-xojo-ide/">faster</a>, which gives you <a href="https://blog.xojo.com/2023/12/12/time-to-reflect-on-stack-optimization/">Time to Reflect on Stack Optimization</a>. In this post, I want to detail those improvements in Xojo 2023r4 that target Xojo Web including faster HandleURL responses, faster transfer rates in Windows and Linux, static assets cache control, Events improvements and a new experimental option.</p>



<span id="more-12313"></span>



<h3 class="wp-block-heading">Faster HandleURL Responses</h3>



<p>With Xojo Web you can create APIs backing your Mobile or Desktop applications. Just by updating to Xojo 2023r4, your web services will get the benefit of much faster responses and the ability to handle many more requests per second.</p>



<p>Just to compare between different Xojo versions, we’ve created some benchmarks using Xojo Web 1 (with Xojo 2019r3.2) and some Xojo Web 2 releases, 2023r3.1 and the latest one, 2023r4.</p>



<p>Here are the results, returning plain text:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="897" height="1024" src="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-897x1024.png" alt="" class="wp-image-12314" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-897x1024.png 897w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-263x300.png 263w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-768x877.png 768w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1346x1536.png 1346w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms.png 1726w" sizes="auto, (max-width: 897px) 100vw, 897px" /></figure>
</div>


<p>And the same test, but this time returning a string generated by JSONItem:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="916" height="1024" src="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-916x1024.png" alt="" class="wp-image-12315" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-916x1024.png 916w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-268x300.png 268w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-768x859.png 768w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-1374x1536.png 1374w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1.png 1764w" sizes="auto, (max-width: 916px) 100vw, 916px" /></figure>
</div>


<p>Xojo 2023r4 is capable of serving around 20x more requests per second compared to Web 1, and around 4x compared to Xojo 2023r3.1. And thanks to the reduced latency time, your API will return the contents much faster.</p>



<h3 class="wp-block-heading">Faster Transfer Rates in Windows and Linux</h3>



<p>While working on performance, we’ve found that applications deployed on Windows and Linux were serving large files much slower than those deployed on macOS servers.</p>



<p>William improved the low level code for sockets on those targets, allowing the server to transfer large files at a much faster speed. During my tests, I’ve seen 10x faster transfer rates.</p>



<p>But this doesn’t affect only our Web target! If you are using a ServerSocket with TCPSocket classes, your Console and Desktop applications will also benefit from these improved transfer rates.</p>



<h3 class="wp-block-heading">Static Assets Cache Control</h3>



<p>In this release, we’ve also improved how the framework interacts with the browser. When your user visits your web application for the first time, it will store all of the required JavaScript and CSS files.</p>



<p>This was already happening in previous releases but with a subtle difference. From now on, the browser won’t even need to check with the server if the file has changed since the last visit. This translates to faster load times for your users and less server load for you since the server won’t need to handle all those requests anymore.</p>



<h3 class="wp-block-heading">Improved Compile Time</h3>



<p>In this release, Xojo Web will compile your projects a few seconds faster. The first time you compile your project, it will cache the result of some processes that are only changing between Xojo releases.</p>



<p>Here is a comparison between 2023r3.1 and 2023r4, both are running a debug session of a blank project:</p>



<figure class="wp-block-video aligncenter"><video height="672" style="aspect-ratio: 2558 / 672;" width="2558" controls src="https://blog.xojo.com/wp-content/uploads/2023/12/web-blank-project-compile-time.mp4"></video></figure>



<p>That’s around 3-4 seconds faster every time a project compiles.</p>



<h3 class="wp-block-heading">Events Improvements</h3>



<p>Some web controls were sending information from the browser to the server more frequently than needed. For example, a WebContainer.Scrolled event was being sent for every scrolled pixel, causing unnecessary server load.</p>



<p>We’ve been reviewing these controls and have made some improvements:</p>



<ul class="wp-block-list">
<li>WebCombobox</li>



<li>WebContainer</li>



<li>WebSearchField</li>



<li>WebTextArea</li>



<li>WebTextField</li>



<li>WebUploader</li>
</ul>



<p>All of them will continue communicating their state updates, but the framework will focus on delivering the latest value available.</p>



<p>For example, in a WebSearchField, if the user writes &#8220;hello&#8221;, the framework will send the first key press (&#8220;h&#8221;) as soon as it happens. The next event it will send will depend on how fast the user types, so it can be either &#8220;hel&#8221; or maybe directly &#8220;hello&#8221;. What is guaranteed is the TextChanged event will be fired for the final value (&#8220;hello&#8221; in this example).</p>



<h3 class="wp-block-heading">New Experimental Option</h3>



<p>WebSession has a new experimental option available, disabled by default. “<a href="https://documentation.xojo.com/api/web/websession.html#websession-sendeventsinbatches">Send Events in Batches</a>”:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="596" height="714" src="https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces.png" alt="" class="wp-image-12317" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces.png 596w, https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces-250x300.png 250w" sizes="auto, (max-width: 596px) 100vw, 596px" /></figure>
</div>


<p>Turning it on will make our JavaScript framework group different event notifications in a single request. Projects that contain complex layouts that show and hide several controls at once may benefit from snappier GUIs.</p>



<p>As a side effect, it will also ensure the events arrive to the server in the correct order. Think about a login screen where the user has an email field, a password and a “Login” button with the Default setting turned on (to allow the user to trigger the Pressed event by pressing the Enter key). When sending the events in different requests, because of network latencies, the WebButton.Pressed event could arrive at the server before the last WebTextField.TextChanged.</p>



<p>We would love to hear your experiences when turning on this experimental option. If you find an issue, <a href="https://tracker.xojo.com/xojoinc/xojo/-/issues/new" target="_blank" rel="noreferrer noopener">please report it</a>.</p>



<h3 class="wp-block-heading">Wrapping Up</h3>



<p>As always, while Xojo 2023r4 comes with a lot of performance improvements, it also comes with bug fixes and feature requests. I want to again thank everyone who took the time to create new Bug reports and Feature Requests, and tested the pre-releases.</p>



<p>We’re looking forward to see what you build with it!</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/12/web-blank-project-compile-time.mp4" length="538605" type="video/mp4" />

			</item>
	</channel>
</rss>
