Commit Graph

6417 Commits

Author SHA1 Message Date
Ben Ogle
8463c759b5 Use global range. Faster! Less garbage! 2013-10-07 10:28:11 -07:00
Ben Ogle
5a772d7078 Move back to the node walker and Range()
This is slower than the span compute, but rendering lines without 
tons of spans is much faster than with
2013-10-07 10:28:11 -07:00
Ben Ogle
6eb72ac2a1 Use getElementsByClassName rather than jQuery 2013-10-07 10:28:10 -07:00
Ben Ogle
8a3f137519 Speed up token html generation. 20ms -> 6ms
Character replace was most of it. Removing regex creation, array 
creation and joins seems to reduce the GC pressure. Calling 500 times, 
GC spent 100ms less time.
2013-10-07 10:28:10 -07:00
Ben Ogle
a57c86f4ea Shortcut out of isHidden when we can.
Checking computed style is an order of magnitude more expensive than 
checking the style property.
2013-10-07 10:28:10 -07:00
Ben Ogle
8cd04b5178 Override isHidden for the Editor
We know it's visible if it is on the dom and doesn't have
display == none set. This is an order of magnitude faster than the
default implementation which calls getComputedStyle()
2013-10-07 10:28:10 -07:00
Ben Ogle
d351938702 Speed up setting the hidden input at the same place as the cursor.
Order of magnitude speedup
2013-10-07 10:28:10 -07:00
Ben Ogle
c2bb5a998b Override isHidden for the CursorView
We know it's visible if it is on the dom and doesn't have 
display == none set. This is an order of magnitude faster than the 
default implementation which calls getComputedStyle()
2013-10-07 10:28:10 -07:00
Ben Ogle
6a494f65a5 💄 2013-10-07 10:28:09 -07:00
Ben Ogle
aa404a316d Don't allow NaNs 2013-10-07 10:28:09 -07:00
Ben Ogle
45d3fea3d0 Update only the changed line numbers 2013-10-07 10:28:09 -07:00
Ben Ogle
0ab382133b Back to display == none for $.fn.isHidden() 2013-10-07 10:28:09 -07:00
Ben Ogle
98a3bb475b Fix for non-extant lines 2013-10-07 10:28:09 -07:00
Ben Ogle
2394f25b92 Add the leftPixel cache back in 2013-10-07 10:28:09 -07:00
Ben Ogle
914288ab86 Wrap each char in a span; compute left position by measuring each span.
This is is faster and simpler than the old method. Running each function
20,000 times yielded these results:

Old: 3750ms
This method: 1523ms
By looking up each char's width in a dict: 29ms
2013-10-07 10:28:08 -07:00
Ben Ogle
aba5eb5b41 Add a cache to positionLeftForLineAndColumn()
This is the slowest function of all.
2013-10-07 10:28:08 -07:00
Ben Ogle
5c46bff4c1 Use isVisible() 2013-10-07 10:28:08 -07:00
Ben Ogle
8f68d62420 Only re render the cursors/selections when in rendered range 2013-10-07 10:28:08 -07:00
Kevin Sawicki
80a9cebbef Don't parse empty strings as JSON
windowState can be an empty string which should not be attempted to be
parsed.
2013-10-04 13:01:44 -07:00
Kevin Sawicki
8f2770d084 Prevent overriding coffee cache once registered
Previously this was done afterwards in index.html and task.coffee
but should really be handled by the cache itself so any module
require a different version of coffee-script are not reregistering
a different require extension handler.
2013-10-04 09:25:31 -07:00
Kevin Sawicki
8be254c878 Export a register method from coffee-cache
This allows it to be required without having any side effects which
is needed for the clean task that just wanted to remove the cache
directory.
2013-10-04 09:20:46 -07:00
Kevin Sawicki
a47b3273dd Send events to browser window even when not focused
The window:open-path event regressed and was not being sent to Atom
which prevented windows from being opened with specific file(s) in
the editor.

Also this allows context menus to work even when the dev tools are open.
2013-10-03 18:14:01 -07:00
Matt Colyer
f74ad104d7 Rename openBasedOnOptions to openWithOptions 2013-10-03 11:39:20 -07:00
Matt Colyer
0f4b36b54a Run test processes separately 2013-10-03 11:30:43 -07:00
Matt Colyer
c04ba75cc1 Remove initialization repetition from a second atom process 2013-10-03 11:29:34 -07:00
Matt Colyer
d8b173b86e Merge pull request #919 from atom/test-without-window
Test without window
2013-10-03 10:57:40 -07:00
Kevin Sawicki
e2fb2fdae5 Set font size and family directly on editor element
Previously this was set via a style tag which ate up a lot of spec
time and seemed to be functionally equivalent to just setting the
style directly on the element instead of finding and adding/removing
style tags.
2013-10-03 09:38:42 -07:00
Kevin Sawicki
6a5151ccbb Update stylesheetsActivated when resources are deactivated 2013-10-03 09:38:25 -07:00
Cheng Zhao
a6b71f07e0 Focus on webview in specs window on startup.
When specs window is hidden it would not get a chance to focus on the webview.
2013-10-03 10:28:00 +08:00
Kevin Sawicki
ea2779b029 Activate stylesheets from deferred deserializer 2013-10-02 19:10:53 -07:00
Kevin Sawicki
e4b55c4210 🐎 Only reload active package stylesheets
Previously all package stylesheets were loaded twice during startup,
once when the themes were loaded and once when the packages were
activated.
2013-10-02 18:49:26 -07:00
Kevin Sawicki
80e4e5f2cd 🐎 Use fs.statSyncNoException in coffee-cache 2013-10-02 18:18:01 -07:00
Kevin Sawicki
80b4572190 Update root view title when initializing
Previously the title would not be updated when opening Atom with
serialized editors.

Also consolidate event listeners to rely on the
pane-container:active-pane-item-changed event to update the title.
2013-10-02 18:05:48 -07:00
Kevin Sawicki
523efd5e1a Use fs-utils for directory check 2013-10-02 17:45:27 -07:00
Kevin Sawicki
0bfc4a3a1b 📝 capitalize Function 2013-10-02 17:01:08 -07:00
Matt Colyer
de9ab2d163 Prevent showing the window via spec-bootstrap.coffee 2013-10-02 16:47:27 -07:00
Kevin Sawicki
e700e6ebe8 📝 doc measure and profile functions 2013-10-02 16:38:45 -07:00
Kevin Sawicki
8129e6c632 fs.statSyncNoException returns false or an object 2013-10-02 16:19:37 -07:00
Kevin Sawicki
f6447a83f3 🐎 Use statSyncNoException in fs-utils 2013-10-02 16:09:02 -07:00
Kevin Sawicki
3bb01c3ebc Guard against global project being null 2013-10-02 16:07:03 -07:00
Kevin Sawicki
7633a2a7d7 Call get instead of getDeserializer 2013-10-02 15:38:21 -07:00
Kevin Sawicki
08177feb67 Simplify method names on DeserializerManager 2013-10-02 15:30:32 -07:00
Kevin Sawicki
ca137974c9 Store site on atom global 2013-10-02 15:23:06 -07:00
Matt Colyer
8f80eeb63f See if tests pass when minimized 2013-10-02 14:23:35 -07:00
Kevin Sawicki
5aa83163ad Memoize load settings and return a clone
Calling this method actual eats up a lot of spec time since
it does an ipc channel sync call.
2013-10-02 14:09:30 -07:00
Matt Colyer
16fd6debea Prevent window from displaying when just running tests 2013-10-02 14:05:07 -07:00
Matt Colyer
171728367e Remove unused import 2013-10-02 13:52:08 -07:00
Kevin Sawicki
a85817369e Add shim for packages accessing atom.packageStates 2013-10-02 13:40:35 -07:00
Kevin Sawicki
63b79a1d04 Bring back userPackageDirPaths for backwards-compatibility 2013-10-02 13:40:35 -07:00
Kevin Sawicki
022db0fc44 Access keymap via atom global 2013-10-02 13:40:35 -07:00