manual-memory.html 1.4 KB

12345678910111213141516171819202122232425262728
  1. <html>
  2. <script src="/../../packages/alpinejs/dist/cdn.js" defer></script>
  3. <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
  4. <table class="w-dull">
  5. <tr>
  6. <td class="p-10 w-1/3"><code>MemoEvaluator cache</code></td>
  7. <td class="p-10 w-1/3">
  8. <p>
  9. In chrome, open dev tools > Memory tag, click on
  10. "Take heap snapshot". First of all, check that there are not existing leaks affecting the test results clicking on
  11. "Take heap snapshot": it should not found any results;
  12. if it does, you might want to run the test in incognito
  13. mode so it does not load any chrome extensions).
  14. Once verified, click the "test" button, go to the memory
  15. tab, click "Collect garbage" a couple of times, take another snapshot and verify we don't have any new
  16. detached node in memory.
  17. </p>
  18. </td>
  19. <td class="p-10 w-1/3">
  20. <div id="one" x-data="{ foo: 'bar' }">
  21. <span x-text="foo"></span>
  22. <button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" @click="document.getElementById('one').remove()">Test</button>
  23. </div>
  24. </td>
  25. </tr>
  26. </table>
  27. </html>